Fixes minor

This commit is contained in:
oscar alvarez 2022-07-30 18:15:08 -05:00
parent d22a1b344b
commit 4129d1baab
4 changed files with 350 additions and 28 deletions

Binary file not shown.

View File

@ -264,9 +264,11 @@ class Folio(ModelSQL, ModelView):
if status in 'check_in' and config.cleaning_occupied: if status in 'check_in' and config.cleaning_occupied:
cleaning_type_id = config.cleaning_occupied.id cleaning_type_id = config.cleaning_occupied.id
room.last_check_in = datetime.now() room.last_check_in = datetime.now()
room.last_check_out = None
elif status in 'check_out' and config.cleaning_check_out: elif status in 'check_out' and config.cleaning_check_out:
cleaning_type_id = config.cleaning_check_out.id cleaning_type_id = config.cleaning_check_out.id
room.last_check_out = datetime.now() room.last_check_out = datetime.now()
room.last_check_in = None
room.state = 'dirty' room.state = 'dirty'
if cleaning_type_id: if cleaning_type_id:

View File

@ -70,6 +70,10 @@ msgctxt "field:hotel.booking,channel_commission:"
msgid "Channel Commission" msgid "Channel Commission"
msgstr "Comisión del Canal" msgstr "Comisión del Canal"
msgctxt "field:hotel.booking,channel_icon:"
msgid "Channel Icon"
msgstr "Icono del Canal"
msgctxt "field:hotel.booking,channel_invoice:" msgctxt "field:hotel.booking,channel_invoice:"
msgid "Channel Invoice" msgid "Channel Invoice"
msgstr "Factura del Canal" msgstr "Factura del Canal"
@ -82,6 +86,10 @@ msgctxt "field:hotel.booking,code:"
msgid "Code" msgid "Code"
msgstr "Código" msgstr "Código"
msgctxt "field:hotel.booking,collect_amount:"
msgid "Collect Amount"
msgstr "Valor Recibido"
msgctxt "field:hotel.booking,comments:" msgctxt "field:hotel.booking,comments:"
msgid "Comments" msgid "Comments"
msgstr "Comentarios" msgstr "Comentarios"
@ -290,6 +298,10 @@ msgctxt "field:hotel.channel,agent:"
msgid "Agent" msgid "Agent"
msgstr "Agente" msgstr "Agente"
msgctxt "field:hotel.channel,code:"
msgid "Code"
msgstr "Código / Número Interno"
msgctxt "field:hotel.channel,collection_mode:" msgctxt "field:hotel.channel,collection_mode:"
msgid "Collection Mode" msgid "Collection Mode"
msgstr "Modo de Cobro" msgstr "Modo de Cobro"
@ -318,6 +330,10 @@ msgctxt "field:hotel.channel,extra_commissions:"
msgid "Extra Commissions" msgid "Extra Commissions"
msgstr "Comisiones Extras" msgstr "Comisiones Extras"
msgctxt "field:hotel.channel,invoice_to:"
msgid "Invoice To"
msgstr "Facturar a"
msgctxt "field:hotel.channel,name:" msgctxt "field:hotel.channel,name:"
msgid "Name" msgid "Name"
msgstr "Nombre" msgstr "Nombre"
@ -326,6 +342,10 @@ msgctxt "field:hotel.channel,payment_method:"
msgid "Payment Method" msgid "Payment Method"
msgstr "Método de pago" msgstr "Método de pago"
msgctxt "field:hotel.channel,payment_mode:"
msgid "Receipt - Payment Mode"
msgstr "Ingreso - Modo de Pago"
msgctxt "field:hotel.channel,price_list:" msgctxt "field:hotel.channel,price_list:"
msgid "Price List" msgid "Price List"
msgstr "Tarifa" msgstr "Tarifa"
@ -402,6 +422,18 @@ msgctxt "field:hotel.configuration,cleaning_occupied:"
msgid "Cleaning Occupied" msgid "Cleaning Occupied"
msgstr "Limpieza Ocupada" msgstr "Limpieza Ocupada"
msgctxt "field:hotel.configuration,cleaning_type_deep:"
msgid "Cleaning Deep"
msgstr "Limpieza Profunda"
msgctxt "field:hotel.configuration,cleaning_type_standard:"
msgid "Cleaning Standard"
msgstr "Limpieza Estandar"
msgctxt "field:hotel.configuration,cleaning_type_tweak:"
msgid "Cleaning Tweak"
msgstr "Retoque"
msgctxt "field:hotel.configuration,company:" msgctxt "field:hotel.configuration,company:"
msgid "Company" msgid "Company"
msgstr "Empresa" msgstr "Empresa"
@ -430,6 +462,10 @@ msgctxt "field:hotel.configuration,hotel_service_sequence:"
msgid "Hotel Service Sequence" msgid "Hotel Service Sequence"
msgstr "Secuencia de Servicio" msgstr "Secuencia de Servicio"
msgctxt "field:hotel.configuration,payment_term:"
msgid "Payment Term"
msgstr "Plazo de Pago"
msgctxt "field:hotel.configuration,quarantine_rooms:" msgctxt "field:hotel.configuration,quarantine_rooms:"
msgid "Quarantine Rooms" msgid "Quarantine Rooms"
msgstr "Cuarentena" msgstr "Cuarentena"
@ -438,6 +474,10 @@ msgctxt "field:hotel.configuration,registration_card_sequence:"
msgid "Registration Card Sequence" msgid "Registration Card Sequence"
msgstr "Secuencia de Tarjeta de Registro" msgstr "Secuencia de Tarjeta de Registro"
msgctxt "field:hotel.configuration,storage_by_default:"
msgid "Storage By Default"
msgstr "Almacen por Defecto"
msgctxt "field:hotel.configuration,taxes_exception_rule:" msgctxt "field:hotel.configuration,taxes_exception_rule:"
msgid "Taxes Exception Rule" msgid "Taxes Exception Rule"
msgstr "Regla de Excepción de Impuestos" msgstr "Regla de Excepción de Impuestos"
@ -830,6 +870,10 @@ msgctxt "field:hotel.housekeeping.cleaning_type,description:"
msgid "Description" msgid "Description"
msgstr "Descripción" msgstr "Descripción"
msgctxt "field:hotel.housekeeping.cleaning_type,kind:"
msgid "Kind"
msgstr "Clase"
msgctxt "field:hotel.housekeeping.cleaning_type,name:" msgctxt "field:hotel.housekeeping.cleaning_type,name:"
msgid "Name" msgid "Name"
msgstr "Nombre" msgstr "Nombre"
@ -878,6 +922,50 @@ msgctxt "field:hotel.location,parent:"
msgid "Parent" msgid "Parent"
msgstr "Padre" msgstr "Padre"
msgctxt "field:hotel.maintenance,action:"
msgid "Action"
msgstr "Acción"
msgctxt "field:hotel.maintenance,criticality:"
msgid "Criticality"
msgstr "Criticidad"
msgctxt "field:hotel.maintenance,description:"
msgid "Description"
msgstr "Descripción"
msgctxt "field:hotel.maintenance,end_date:"
msgid "End Maintenance"
msgstr "Fin de Matenimiento"
msgctxt "field:hotel.maintenance,inspected_by:"
msgid "Inspected By"
msgstr "Inspeccionada Por"
msgctxt "field:hotel.maintenance,issue:"
msgid "Issue"
msgstr "Asunto"
msgctxt "field:hotel.maintenance,register_date:"
msgid "Date"
msgstr "Fecha"
msgctxt "field:hotel.maintenance,room:"
msgid "Room"
msgstr "Habitación"
msgctxt "field:hotel.maintenance,start_date:"
msgid "Start Maintenance"
msgstr "Inicio de Mantenimiento"
msgctxt "field:hotel.maintenance,state:"
msgid "State"
msgstr "Estado"
msgctxt "field:hotel.maintenance,total_days:"
msgid "Total Days"
msgstr "Total Días"
msgctxt "field:hotel.migration_city,code:" msgctxt "field:hotel.migration_city,code:"
msgid "Code" msgid "Code"
msgstr "Código" msgstr "Código"
@ -926,6 +1014,18 @@ msgctxt "field:hotel.print_guests_list.start,date:"
msgid "Date" msgid "Date"
msgstr "Fecha" msgstr "Fecha"
msgctxt "field:hotel.print_housekeeping.start,company:"
msgid "Company"
msgstr "Empresa"
msgctxt "field:hotel.print_housekeeping.start,date:"
msgid "Date"
msgstr "Fecha"
msgctxt "field:hotel.print_housekeeping.start,employee:"
msgid "Employee"
msgstr "Empleado"
msgctxt "field:hotel.print_housekeeping_service.start,company:" msgctxt "field:hotel.print_housekeeping_service.start,company:"
msgid "Company" msgid "Company"
msgstr "Empresa" msgstr "Empresa"
@ -967,17 +1067,37 @@ msgid "Amenities"
msgstr "Comodidades" msgstr "Comodidades"
msgctxt "field:hotel.room,channel_id:" msgctxt "field:hotel.room,channel_id:"
msgid "Channel ID" msgid "Channel Manager ID"
msgstr "ID Canal" msgstr "ID Canal"
msgctxt "field:hotel.room,classification:" msgctxt "field:hotel.room,classification:"
msgid "Classification" msgid "Classification"
msgstr "Clasificación" msgstr "Clasificación"
msgctxt "field:hotel.room,cleaning_type:"
msgid "Cleaning Type"
msgstr "Tipo de Limipeza"
msgctxt "field:hotel.room,code:" msgctxt "field:hotel.room,code:"
msgid "Code" msgid "Code"
msgstr "Código" msgstr "Código"
msgctxt "field:hotel.room,housekeeping:"
msgid "Employee"
msgstr "Empleado"
msgctxt "field:hotel.room,last_check_in:"
msgid "Last Check In"
msgstr "Último Check-In"
msgctxt "field:hotel.room,last_check_out:"
msgid "Last Check Out"
msgstr "Último Check-Out"
msgctxt "field:hotel.room,last_clean:"
msgid "Last Clean"
msgstr "Última Limpieza"
msgctxt "field:hotel.room,location:" msgctxt "field:hotel.room,location:"
msgid "Location" msgid "Location"
msgstr "Ubicación" msgstr "Ubicación"
@ -998,10 +1118,18 @@ msgctxt "field:hotel.room,name:"
msgid "Name" msgid "Name"
msgstr "Nombre" msgstr "Nombre"
msgctxt "field:hotel.room,notes:"
msgid "Notes"
msgstr "Observaciones"
msgctxt "field:hotel.room,space:" msgctxt "field:hotel.room,space:"
msgid "Space" msgid "Space"
msgstr "Espacio" msgstr "Espacio"
msgctxt "field:hotel.room,state:"
msgid "Status"
msgstr "Estado"
msgctxt "field:hotel.room,templates:" msgctxt "field:hotel.room,templates:"
msgid "Hotel Room - Product Accommodation" msgid "Hotel Room - Product Accommodation"
msgstr "Habitación - Acomodación" msgstr "Habitación - Acomodación"
@ -1026,6 +1154,18 @@ msgctxt "field:hotel.room.classification,name:"
msgid "Name" msgid "Name"
msgstr "Nombre" msgstr "Nombre"
msgctxt "field:hotel.room.cleaning_type,description:"
msgid "Description"
msgstr "Descripción"
msgctxt "field:hotel.room.cleaning_type,kind:"
msgid "Kind"
msgstr "Clase de Limpieza"
msgctxt "field:hotel.room.cleaning_type,name:"
msgid "Name"
msgstr "Nombre del registro"
msgctxt "field:hotel.service,company:" msgctxt "field:hotel.service,company:"
msgid "Company" msgid "Company"
msgstr "Empresa" msgstr "Empresa"
@ -1347,7 +1487,7 @@ msgid "Main contact or person how request booking"
msgstr "Contacto principal o persona quien solicita la reserva" msgstr "Contacto principal o persona quien solicita la reserva"
msgctxt "help:hotel.booking,media:" msgctxt "help:hotel.booking,media:"
msgid "Media from booking coming from." msgid "Way through which the booking arrives."
msgstr "Medio por el cual se hace la reserva." msgstr "Medio por el cual se hace la reserva."
msgctxt "help:hotel.booking,number:" msgctxt "help:hotel.booking,number:"
@ -1396,6 +1536,10 @@ msgctxt "help:hotel.housekeeping.task,frecuency:"
msgid "In days" msgid "In days"
msgstr "En días" msgstr "En días"
msgctxt "help:hotel.maintenance,register_date:"
msgid "The date of register of the issue"
msgstr "Fecha de registro del problema"
msgctxt "help:hotel.room,space:" msgctxt "help:hotel.room,space:"
msgid "Space on m2" msgid "Space on m2"
msgstr "Espacio en m2" msgstr "Espacio en m2"
@ -1496,6 +1640,10 @@ msgctxt "model:hotel.location,name:"
msgid "Hotel Location" msgid "Hotel Location"
msgstr "Locaciones de Hotel" msgstr "Locaciones de Hotel"
msgctxt "model:hotel.maintenance,name:"
msgid "Hotel Maintenance"
msgstr "Mantenimiento de la Propiedad"
msgctxt "model:hotel.migration_city,name:" msgctxt "model:hotel.migration_city,name:"
msgid "Migration City" msgid "Migration City"
msgstr "Ciudad de Migración" msgstr "Ciudad de Migración"
@ -1520,6 +1668,10 @@ msgctxt "model:hotel.print_guests_list.start,name:"
msgid "Guests List Start" msgid "Guests List Start"
msgstr "Lista de Huespedes" msgstr "Lista de Huespedes"
msgctxt "model:hotel.print_housekeeping.start,name:"
msgid "Print Housekeeping Service Start"
msgstr "Ama de Llaves"
msgctxt "model:hotel.print_housekeeping_service.start,name:" msgctxt "model:hotel.print_housekeeping_service.start,name:"
msgid "Print Housekeeping Service Start" msgid "Print Housekeeping Service Start"
msgstr "Ama de Llaves" msgstr "Ama de Llaves"
@ -1548,6 +1700,10 @@ msgctxt "model:hotel.room.classification,name:"
msgid "Room Classification" msgid "Room Classification"
msgstr "Clasificación de Habitación" msgstr "Clasificación de Habitación"
msgctxt "model:hotel.room.cleaning_type,name:"
msgid "Room Cleaning Type"
msgstr "Tipo de Limpieza"
msgctxt "model:hotel.service,name:" msgctxt "model:hotel.service,name:"
msgid "Service" msgid "Service"
msgstr "Servicio" msgstr "Servicio"
@ -1604,13 +1760,9 @@ msgctxt "model:ir.action,name:act_hotel_configuration_form"
msgid "Hotel Configuration" msgid "Hotel Configuration"
msgstr "Configuración del Hotel" msgstr "Configuración del Hotel"
msgctxt "model:ir.action,name:act_housekeeping_cleaning_type_form" msgctxt "model:ir.action,name:act_hotel_maintenance_form"
msgid "Cleaning Type" msgid "Maintenance"
msgstr "Tipo de Limpieza" msgstr "Mantenimiento"
msgctxt "model:ir.action,name:act_housekeeping_form"
msgid "Housekeeping"
msgstr "Ama de Llaves"
msgctxt "model:ir.action,name:act_location_tree" msgctxt "model:ir.action,name:act_location_tree"
msgid "Locations" msgid "Locations"
@ -1632,10 +1784,18 @@ msgctxt "model:ir.action,name:act_room_classification_form"
msgid "Room Classification" msgid "Room Classification"
msgstr "Clasificación de Habitación" msgstr "Clasificación de Habitación"
msgctxt "model:ir.action,name:act_room_cleaning_type_form"
msgid "Cleaning Type"
msgstr "Tipo de Limipeza"
msgctxt "model:ir.action,name:act_room_form" msgctxt "model:ir.action,name:act_room_form"
msgid "Room" msgid "Room"
msgstr "Habitación" msgstr "Habitación"
msgctxt "model:ir.action,name:act_room_housekeeping_form"
msgid "Housekeeping"
msgstr "Ama de Llaves"
msgctxt "model:ir.action,name:act_service_kind_tree" msgctxt "model:ir.action,name:act_service_kind_tree"
msgid "Service Kind" msgid "Service Kind"
msgstr "Clase de Servicio" msgstr "Clase de Servicio"
@ -1684,8 +1844,8 @@ msgctxt "model:ir.action,name:report_hotel_service"
msgid "Service" msgid "Service"
msgstr "Servicio" msgstr "Servicio"
msgctxt "model:ir.action,name:report_housekeeping_service" msgctxt "model:ir.action,name:report_housekeeping"
msgid "Reporte de Ama de Llaves" msgid "Housekeeping Report"
msgstr "Reporte de Ama de Llaves" msgstr "Reporte de Ama de Llaves"
msgctxt "model:ir.action,name:report_invoice_income_daily" msgctxt "model:ir.action,name:report_invoice_income_daily"
@ -1728,8 +1888,8 @@ msgctxt "model:ir.action,name:wizard_print_guests_list"
msgid "Guests List" msgid "Guests List"
msgstr "Lista de Huespedes" msgstr "Lista de Huespedes"
msgctxt "model:ir.action,name:wizard_print_housekeeping_service" msgctxt "model:ir.action,name:wizard_print_housekeeping"
msgid "HouseKeeping Service" msgid "Housekeeping Report"
msgstr "Reporte de Ama de Llaves" msgstr "Reporte de Ama de Llaves"
msgctxt "model:ir.action,name:wizard_print_invoice_income_daily" msgctxt "model:ir.action,name:wizard_print_invoice_income_daily"
@ -1760,11 +1920,6 @@ msgctxt "model:ir.action.act_window.domain,name:act_booking_form_domain_all"
msgid "All" msgid "All"
msgstr "Todos" msgstr "Todos"
msgctxt ""
"model:ir.action.act_window.domain,name:act_booking_form_domain_check_out"
msgid "Check Out"
msgstr "Check Out"
msgctxt "" msgctxt ""
"model:ir.action.act_window.domain,name:act_booking_form_domain_confirmed" "model:ir.action.act_window.domain,name:act_booking_form_domain_confirmed"
msgid "Confirmed" msgid "Confirmed"
@ -1809,6 +1964,26 @@ msgctxt ""
msgid "Present" msgid "Present"
msgstr "Presentes" msgstr "Presentes"
msgctxt ""
"model:ir.action.act_window.domain,name:act_hotel_maintenance_form_domain_all"
msgid "All"
msgstr "Todos"
msgctxt ""
"model:ir.action.act_window.domain,name:act_hotel_maintenance_form_domain_confirmed"
msgid "Confirmed"
msgstr "Confirmado"
msgctxt ""
"model:ir.action.act_window.domain,name:act_hotel_maintenance_form_domain_draft"
msgid "Draft`"
msgstr "Borrador"
msgctxt ""
"model:ir.action.act_window.domain,name:act_hotel_maintenance_form_domain_in_progress"
msgid "In Progress"
msgstr "En progreso"
msgctxt "model:ir.action.act_window.domain,name:act_service_form_domain_all" msgctxt "model:ir.action.act_window.domain,name:act_service_form_domain_all"
msgid "All" msgid "All"
msgstr "Todos" msgstr "Todos"
@ -1832,7 +2007,7 @@ msgstr "Hoy"
msgctxt "model:ir.message,text:msg_accommodation_not_defined" msgctxt "model:ir.message,text:msg_accommodation_not_defined"
msgid "The room %s has not accommodation" msgid "The room %s has not accommodation"
msgstr "" msgstr "La habitación %s no tiene acomodación"
msgctxt "model:ir.message,text:msg_check_time_not_configured" msgctxt "model:ir.message,text:msg_check_time_not_configured"
msgid "The check out time is not configured!" msgid "The check out time is not configured!"
@ -1870,6 +2045,10 @@ msgctxt "model:ir.message,text:msg_missing_confirm_booking"
msgid "Missing Confirm Booking" msgid "Missing Confirm Booking"
msgstr "Falta confirmar la reserva" msgstr "Falta confirmar la reserva"
msgctxt "model:ir.message,text:msg_missing_customer"
msgid "Missing party or customer to pay!"
msgstr "Falta definir el tercero o cliente que paga!"
msgctxt "model:ir.message,text:msg_missing_default_configuration" msgctxt "model:ir.message,text:msg_missing_default_configuration"
msgid "" msgid ""
"Missing default configuration for check-in time or check-out time or " "Missing default configuration for check-in time or check-out time or "
@ -1884,6 +2063,10 @@ msgctxt "model:ir.message,text:msg_missing_party_holder"
msgid "Missing party holder!" msgid "Missing party holder!"
msgstr "Falta el cliente / titular!" msgstr "Falta el cliente / titular!"
msgctxt "model:ir.message,text:msg_missing_payment_mode"
msgid "Missing payment mode in channel!"
msgstr "Falta definir el modo de pago en el canal!"
msgctxt "model:ir.message,text:msg_missing_select_room" msgctxt "model:ir.message,text:msg_missing_select_room"
msgid "Missing select room!" msgid "Missing select room!"
msgstr "Falta seleccionar la habitación!" msgstr "Falta seleccionar la habitación!"
@ -2008,9 +2191,9 @@ msgctxt "model:ir.ui.menu,name:menu_hotel_configuration"
msgid "Configuration" msgid "Configuration"
msgstr "Configuración" msgstr "Configuración"
msgctxt "model:ir.ui.menu,name:menu_hotel_housekeeping_cleaning_type" msgctxt "model:ir.ui.menu,name:menu_hotel_maintenance"
msgid "Cleaning Type" msgid "Maintenance"
msgstr "Tipo de Limpieza" msgstr "Mantenimiento"
msgctxt "model:ir.ui.menu,name:menu_hotel_manager" msgctxt "model:ir.ui.menu,name:menu_hotel_manager"
msgid "Manager Report" msgid "Manager Report"
@ -2028,6 +2211,10 @@ msgctxt "model:ir.ui.menu,name:menu_hotel_room_classification"
msgid "Room Classification" msgid "Room Classification"
msgstr "Clasificación de Habitación" msgstr "Clasificación de Habitación"
msgctxt "model:ir.ui.menu,name:menu_hotel_room_cleaning_type"
msgid "Cleaning Type"
msgstr "Tipo de Limipeza"
msgctxt "model:ir.ui.menu,name:menu_hotel_service" msgctxt "model:ir.ui.menu,name:menu_hotel_service"
msgid "Service" msgid "Service"
msgstr "Servicios" msgstr "Servicios"
@ -2044,9 +2231,9 @@ msgctxt "model:ir.ui.menu,name:menu_housekeeping_form"
msgid "Housekeeping" msgid "Housekeeping"
msgstr "Ama de Llaves" msgstr "Ama de Llaves"
msgctxt "model:ir.ui.menu,name:menu_housekeeping_service" msgctxt "model:ir.ui.menu,name:menu_housekeeping_report"
msgid "HouseKeeping Service" msgid "Housekeeping Report"
msgstr "Servicio de Ama de Llaves" msgstr "Reporte de Ama de Llaves"
msgctxt "model:ir.ui.menu,name:menu_invoice_income_daily" msgctxt "model:ir.ui.menu,name:menu_invoice_income_daily"
msgid "Invoice Income Daily Report" msgid "Invoice Income Daily Report"
@ -5994,6 +6181,18 @@ msgctxt "selection:hotel.booking,type_complementary:"
msgid "In House" msgid "In House"
msgstr "En Casa" msgstr "En Casa"
msgctxt "selection:hotel.channel,code:"
msgid "Booking"
msgstr "Reserva"
msgctxt "selection:hotel.channel,code:"
msgid "Despegar"
msgstr ""
msgctxt "selection:hotel.channel,code:"
msgid "Expedia"
msgstr ""
msgctxt "selection:hotel.channel,collection_mode:" msgctxt "selection:hotel.channel,collection_mode:"
msgid "After-Sale" msgid "After-Sale"
msgstr "Post-Venta" msgstr "Post-Venta"
@ -6002,6 +6201,14 @@ msgctxt "selection:hotel.channel,collection_mode:"
msgid "Anticipated" msgid "Anticipated"
msgstr "Anticipado" msgstr "Anticipado"
msgctxt "selection:hotel.channel,invoice_to:"
msgid "Channel"
msgstr "Canal"
msgctxt "selection:hotel.channel,invoice_to:"
msgid "Customer"
msgstr "Cliente / Titular"
msgctxt "selection:hotel.channel,payment_method:" msgctxt "selection:hotel.channel,payment_method:"
msgid "At Destination" msgid "At Destination"
msgstr "En Destino" msgstr "En Destino"
@ -6190,6 +6397,82 @@ msgctxt "selection:hotel.housekeeping,state:"
msgid "Maintenance" msgid "Maintenance"
msgstr "Mantenimiento" msgstr "Mantenimiento"
msgctxt "selection:hotel.housekeeping.cleaning_type,kind:"
msgid "Deep"
msgstr "Profunda"
msgctxt "selection:hotel.housekeeping.cleaning_type,kind:"
msgid "Standard"
msgstr "Estándar"
msgctxt "selection:hotel.housekeeping.cleaning_type,kind:"
msgid "Tweak"
msgstr "Retoque"
msgctxt "selection:hotel.maintenance,criticality:"
msgid "Important"
msgstr "Importante"
msgctxt "selection:hotel.maintenance,criticality:"
msgid "Low"
msgstr "Baja"
msgctxt "selection:hotel.maintenance,criticality:"
msgid "Urgent"
msgstr "Urgente"
msgctxt "selection:hotel.maintenance,state:"
msgid "Canceled"
msgstr "Cancelado"
msgctxt "selection:hotel.maintenance,state:"
msgid "Confirmed"
msgstr "Confirmado"
msgctxt "selection:hotel.maintenance,state:"
msgid "Draft"
msgstr "Borrador"
msgctxt "selection:hotel.maintenance,state:"
msgid "Finished"
msgstr "Terminado"
msgctxt "selection:hotel.maintenance,state:"
msgid "In progress"
msgstr "En Progreso"
msgctxt "selection:hotel.maintenance,state:"
msgid "in_progress"
msgstr ""
msgctxt "selection:hotel.room,state:"
msgid "Clean"
msgstr "Limpiar"
msgctxt "selection:hotel.room,state:"
msgid "Dirty"
msgstr "Sucia"
msgctxt "selection:hotel.room,state:"
msgid "Inspected"
msgstr "Inspecionada"
msgctxt "selection:hotel.room,state:"
msgid "Maintenance"
msgstr "Mantenimiento"
msgctxt "selection:hotel.room.cleaning_type,kind:"
msgid "Deep"
msgstr "Profunda"
msgctxt "selection:hotel.room.cleaning_type,kind:"
msgid "Standard"
msgstr "Estándar"
msgctxt "selection:hotel.room.cleaning_type,kind:"
msgid "Tweak"
msgstr "Retoque"
msgctxt "selection:hotel.service,state:" msgctxt "selection:hotel.service,state:"
msgid "Checked" msgid "Checked"
msgstr "Revisado" msgstr "Revisado"
@ -6614,6 +6897,14 @@ msgctxt "wizard_button:hotel.print_guests_list,start,print_:"
msgid "Open" msgid "Open"
msgstr "Abrir" msgstr "Abrir"
msgctxt "wizard_button:hotel.print_housekeeping,start,end:"
msgid "Cancel"
msgstr "Cancelar"
msgctxt "wizard_button:hotel.print_housekeeping,start,print_:"
msgid "Open"
msgstr "Abrir"
msgctxt "wizard_button:hotel.print_housekeeping_service,start,end:" msgctxt "wizard_button:hotel.print_housekeeping_service,start,end:"
msgid "Cancel" msgid "Cancel"
msgstr "Cancelar" msgstr "Cancelar"

35
room.py
View File

@ -1,6 +1,6 @@
#This file is part of Presik. The COPYRIGHT file at the top level of #This file is part of Presik. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms. # this repository contains the full copyright notices and license terms.
from datetime import datetime from datetime import datetime, date, timedelta
from trytond.model import ModelView, ModelSQL, Workflow, fields from trytond.model import ModelView, ModelSQL, Workflow, fields
from trytond.pyson import Eval from trytond.pyson import Eval
@ -57,8 +57,9 @@ class Room(Workflow, ModelSQL, ModelView):
('maintenance', 'Maintenance'), ('maintenance', 'Maintenance'),
], 'Status', required=True, readonly=True) ], 'Status', required=True, readonly=True)
state_string = state.translated('state') state_string = state.translated('state')
cleaning_type = fields.Many2One('hotel.room.cleaning_type', cleaning_type = fields.Function(fields.Many2One(
'Cleaning Type', required=False) 'hotel.room.cleaning_type', 'Cleaning Type', required=False),
'get_cleaning_type')
last_check_in = fields.DateTime('Last Check In') last_check_in = fields.DateTime('Last Check In')
last_check_out = fields.DateTime('Last Check Out') last_check_out = fields.DateTime('Last Check Out')
last_clean = fields.DateTime('Last Clean') last_clean = fields.DateTime('Last Clean')
@ -109,6 +110,7 @@ class Room(Workflow, ModelSQL, ModelView):
@Workflow.transition('clean') @Workflow.transition('clean')
def clean(cls, records): def clean(cls, records):
for rec in records: for rec in records:
rec.last_clean = datetime.now()
rec.cleaning_type = None rec.cleaning_type = None
rec.save() rec.save()
@ -133,6 +135,33 @@ class Room(Workflow, ModelSQL, ModelView):
def inspected(cls, records): def inspected(cls, records):
pass pass
def get_cleaning_type(self, name=None):
pool = Pool()
Config = pool.get('hotel.configuration')
Folio = pool.get('hotel.folio')
config = Config.get_configuration()
today = date.today()
yesterday = today - timedelta(days=-1)
read = Folio.search_read
folios = read([
('room', '=', self.id),
('departure_date', '=', today)
], fields_names=['registration_state'],
)
if folios:
return config.cleaning_check_out.id
else:
folios = read([
('room', '=', self.id),
('departure_date', '>', today),
('arrival_date', '<', today),
], fields_names=['registration_state'],
)
if folios:
return config.cleaning_occupied.id
else:
return config.cleaning_check_in.id
class RoomAmenities(ModelSQL): class RoomAmenities(ModelSQL):
'Room - Amenities' 'Room - Amenities'