From a8cfe40b18104852af79e8d3bd6fbf223aae5400 Mon Sep 17 00:00:00 2001 From: Jose Luis Date: Mon, 18 Mar 2019 18:34:56 +0100 Subject: [PATCH 1/5] [FIX] Children and Adult calculate. --- hotel/data/email_template_cancel.xml | 1208 +++++++++++++++----------- 1 file changed, 691 insertions(+), 517 deletions(-) diff --git a/hotel/data/email_template_cancel.xml b/hotel/data/email_template_cancel.xml index 32c0bc91f..d4b7eabff 100644 --- a/hotel/data/email_template_cancel.xml +++ b/hotel/data/email_template_cancel.xml @@ -12,524 +12,698 @@ + /*Global Styles*/ + .global { + margin: 0; + padding: 0; + min-width: 100% !important; + } + a { + color: #5e96ea; + text-decoration: none; + font-weight: bold; + } + img { + height: auto; + } + .content { + border: 1px solid #eeeeee; + } + .logo { + font-family: sans-serif; + font-size: 36px; + font-weight: bold; + color: #ffffff; + } + .link a { + font-family: sans-serif; + font-size: 12px; + color: #ffffff; + } + .subheading { + font-size: 14px; + color: #cccccc; + font-family: sans-serif; + font-weight: bold; + padding: 0 0 0 0; + text-transform: uppercase; + letter-spacing: 1px; + } + .h1 { + font-family: sans-serif; + font-size: 48px; + font-weight: bold; + line-height: 56px; + color: #ffffff; + padding: 0 0 0 0; + } + .h2 { + font-family: sans-serif; + font-size: 18px; + font-weight: bold; + color: #444444; + padding: 0 0 0 0; + text-transform: uppercase; + letter-spacing: 0.5px; + } + .h3 { + font-family: sans-serif; + font-size: 24px; + font-weight: regular; + color: #555555; + padding: 0 0 0 0; + } + .h4 { + font-family: sans-serif; + font-size: 18px; + font-weight: bold; + color: #666666; + padding: 0 0 0 0; + } + .paragraph { + font-family: sans-serif; + font-size: 14px; + line-height: 22px; + color: #666666; + font-weight: 200; + padding: 20px 0 0 0; + } + .listitem { + font-family: sans-serif; + font-size: 15px; + color: #666666; + font-weight: 200; + padding: 0 0 20px 0; + } + .smalltext { + font-family: sans-serif; + font-size: 14px; + color: #cccccc; + padding: 3px 0 0 0; + } + .borderbottom { + border-bottom: 1px solid #f2eeed; + } + /*Media Queries*/ + @media only screen and (max-width: 651px) { + .columns { + width: 100% !important; + } + .columncontainer { + display: block !important; + width: 100% !important; + } + .paragraph, + .listitem { + font-size: 18px; + } + .link { + float: left; + } + } + @media only screen and (min-width: 651px) { + .content { + width: 650px !important; + } + } + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ Alda Hotels + + + + + + +
+ + + + + + +
+ + + + + + + +
+
+
+ + + + + + + + + + + + + + + +
Tu reserva se ha cancelado en ${object.company_id.property_name}
+ + + + + + +
- /*Global Styles*/ - .global {margin: 0; padding: 0; min-width: 100%!important;} - a { color: #5e96ea; text-decoration: none; font-weight: bold;} - img {height: auto;} - .content { border: 1px solid #eeeeee; } - .logo {font-family: sans-serif; font-size: 36px; font-weight: bold; color: #ffffff;} - .link a {font-family: sans-serif; font-size: 12px; color: #ffffff;} - .subheading {font-size: 14px; color: #cccccc; font-family: sans-serif; font-weight: bold; padding: 0 0 0 0; text-transform: uppercase; letter-spacing: 1px;} - .h1 {font-family: sans-serif; font-size: 48px; font-weight: bold; line-height: 56px; color: #ffffff; padding: 0 0 0 0;} - .h2 {font-family: sans-serif; font-size: 18px; font-weight: bold; color: #444444; padding: 0 0 0 0; text-transform: uppercase; letter-spacing: 0.5px;} - .h3 {font-family: sans-serif; font-size: 24px; font-weight: regular; color: #555555; padding: 0 0 0 0;} - .h4 {font-family: sans-serif; font-size: 18px; font-weight: bold; color: #666666; padding: 0 0 0 0;} - .paragraph {font-family: sans-serif; font-size: 14px; line-height: 22px; color: #666666; font-weight: 200; padding: 20px 0 0 0;} - .listitem {font-family: sans-serif; font-size: 15px; color: #666666; font-weight: 200; padding: 0 0 20px 0;} - .smalltext { font-family: sans-serif; font-size: 14px; color: #cccccc; padding: 3px 0 0 0; } - .borderbottom {border-bottom: 1px solid #f2eeed;} - - /*Media Queries*/ - @media only screen and (max-width: 651px){ - .columns{width:100% !important;} - .columncontainer{display:block !important; width:100% !important;} - .paragraph, .listitem {font-size: 18px;} - .link { float: left;} - } - - @media only screen and (min-width: 651px) { - .content {width: 650px !important;} - } - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- Alda Hotels - - - - -
- - - - -
- - - - - -
-
-
- - - - - - - - - - - - -
Tu reserva se ha cancelado en ${object.company_id.property_name}
- - - - -
  - -
-
Hola ${object.partner_id.firstname}
- Tu reserva en ${object.company_id.property_name} se ha anulado correctamente. No es necesario que hagas nada más. - Si la cancelación conlleva la devolución de alguna cantidad, nos pondremos en contacto contigo. - En caso de que tengas alguna duda, estaremos encantados de atenderte. -
- - - - -
- -
Contactar -
-
-
-
-
- - - - - -
- - - - -
- Cancelación -
-
- - - - -
- - - - - - - - - - - - -
Datos de tu reserva cancelada
- ${object.partner_id.name} -
- % if object.partner_id.contact_address: - ${object.partner_id.contact_address}
- % endif -
- % for rline in object.get_grouped_reservations_json('cancelled'): - ${rline['num']} x ${rline['room_type']['name']} - % if rline['childrens'] > 0: - (${rline['adults']} Adults + ${rline['childrens']} Childrens) - % else: - (${rline['adults']} Adults) - %endif - -
- Entrada: ${format_tz(rline['checkin'], format="%d de %B de %Y")}
- Salida: ${format_tz(rline['checkout'], format="%d de %B de %Y")}
- Nº de noches: ${rline['nights']}

- % endfor -
-
-
-
- - - - - -
- - - - -
- Pago -
-
- - - - -
- - - - - - - - - - - - -
IMPORTES
- Noches: ${len(object.room_lines[0].reservation_lines)}
- Base imponible: ${object.amount_untaxed} €
- I.V.A (10%): ${object.amount_tax} €
- Precio total: ${object.amount_total} €
- Coste de cancelación: [[importe]]
-
-
-
-
-
-
- - - - - - - -
- - - - -
- - - -
-
-
- - - -
-
-
- - - - -
- - - - - - - - - -
NUESTRAS REDES SOCIALES 
-
-
- - - - - - -
- - - - -
- - - - - - - - - - - - - - - - -
- - Facebook - -
Facebook
- - - - -
  -
-
Toda la actualidad de nuestros alojamientos, así como ofertas y promociones.
- - - - -
- - -
Dale a Me gusta
-
- -
-
-
-
- - - - -
- - - - - - - - - - - - - - - - -
- - Instagram - -
Instagram
- - - - -
  -
-
Cada detalle cuenta, y es por eso que tratamos de reflejarlo en nuestras fotos.
- - - - -
- - -
#Entra -
-
- -
-
-
-
- - - - -
- - - - - - - - - - - - - - - - -
- - Twitter - -
Twitter
- - - - -
  -
-
Propuestas al minuto para hacer de tu viaje una experiencia inmejorable.
- - - - -
- - -
Síguenos -
-
- -
-
-
-
-
- - - - - - -
¡Esperamos verte pronto!
-
- - - -
- Alda Hotels - - - -
-
- -
-
+
+
Hola ${object.partner_id.firstname}
+ Tu reserva en ${object.company_id.property_name} se ha anulado correctamente. No es necesario que hagas nada más. + Si la cancelación conlleva la devolución de alguna cantidad, nos pondremos en contacto contigo. + En caso de que tengas alguna duda, estaremos encantados de atenderte. +
+ + + + + + +
+ +
Contactar +
+
+
+
+
+ + + + + + + +
+ + + + + + +
+ Cancelación +
+
+ + + + + + +
+ + + + + + + + + + + + + + +
Datos de tu reserva cancelada
+ ${object.partner_id.name} +
+ % if object.partner_id.contact_address: + ${object.partner_id.contact_address}
+ % endif +
+ % for rline in object.get_grouped_reservations_json('cancelled'): + + ${rline['num']} x ${rline['room_type']['name']} + % if rline['childrens'] == 0: + (${rline['adults']} Adultos) + % else: + (${rline['adults']} Adultos + ${rline['childrens']} Niños) + % endif +
+
+
+ Entrada: ${format_tz(rline['checkin'], format="%d de %B de %Y")}
+ Salida: ${format_tz(rline['checkout'], format="%d de %B de %Y")}
+ Nº de noches: ${rline['nights']}

+ % endfor +
+
+
+
+ + + + + + + +
+ + + + + + +
+ Pago +
+
+ + + + + + +
+ + + + + + + + + + + + + + +
IMPORTES
+ Noches: ${len(object.room_lines[0].reservation_lines)}
+ Base imponible: ${object.amount_untaxed} €
+ I.V.A (10%): ${object.amount_tax} €
+ Precio total: ${object.amount_total} €
+ Coste de cancelación: [[importe]]
+
+
+
+
+
+
+ + + + + + + + + +
+ + + + + + +
+ + + + + +
+
+
+ + + + + +
+
+
+ + + + + + +
+ + + + + + + + + + + +
NUESTRAS REDES SOCIALES
+
+
+ + + + + + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + Facebook + +
Facebook
+ + + + + + +
+
+
Toda la actualidad de nuestros alojamientos, así como ofertas y promociones.
+ + + + + + +
+ + +
Dale + a Me gusta
+
+ +
+
+
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + Instagram + +
Instagram
+ + + + + + +
+
+
Cada detalle cuenta, y es por eso que tratamos de reflejarlo en nuestras fotos.
+ + + + + + +
+ + +
#Entra +
+
+ +
+
+
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + Twitter + +
Twitter
+ + + + + + +
+
+
Propuestas al minuto para hacer de tu viaje una experiencia inmejorable.
+ + + + + + +
+ + +
Síguenos +
+
+ +
+
+
+
+
+ + + + + + + + +
¡Esperamos verte + pronto!
+
+ + + + + +
+ Alda Hotels + + + + + +
+
+ +
+
]]>
From ee41732182b730b5bc6387c26d236e156e144526 Mon Sep 17 00:00:00 2001 From: Jose Luis Date: Mon, 18 Mar 2019 19:51:52 +0100 Subject: [PATCH 2/5] [FIX] DateTime problems in templates --- hotel/data/email_template_cancel.xml | 4 +- hotel/data/email_template_reserv.xml | 1930 ++++++++++++++------------ 2 files changed, 1014 insertions(+), 920 deletions(-) diff --git a/hotel/data/email_template_cancel.xml b/hotel/data/email_template_cancel.xml index d4b7eabff..757f77348 100644 --- a/hotel/data/email_template_cancel.xml +++ b/hotel/data/email_template_cancel.xml @@ -279,8 +279,8 @@

- Entrada: ${format_tz(rline['checkin'], format="%d de %B de %Y")}
- Salida: ${format_tz(rline['checkout'], format="%d de %B de %Y")}
+ Entrada: ${format_tz(rline['checkin']+ ' 00:00:00', format="%d de %B de %Y")}
+ Salida: ${format_tz(rline['checkout']+ ' 00:00:00', format="%d de %B de %Y")}
Nº de noches: ${rline['nights']}

% endfor diff --git a/hotel/data/email_template_reserv.xml b/hotel/data/email_template_reserv.xml index 9fff963d4..d2b5ec979 100644 --- a/hotel/data/email_template_reserv.xml +++ b/hotel/data/email_template_reserv.xml @@ -5,942 +5,1036 @@ Confirm Reservation-Send by Email - Confirmación de los detalles de su reserva en ${object.company_id.display_name} + Confirmación de los detalles de su reserva en ${object.company_id.property_name} ${(object.partner_id.id or '')} + /*Global Styles*/ + .marco { + bgcolor: #f6f6f6; + margin: 0; + padding: 0; + min-width: 100% !important; + } + + a { + color: #5e96ea; + text-decoration: none; + font-weight: bold; + } + + img { + height: auto; + } + + .content { + border: 1px solid #eeeeee; + } + + .logo { + font-family: sans-serif; + font-size: 36px; + font-weight: bold; + color: #ffffff; + } + + .link a { + font-family: sans-serif; + font-size: 12px; + color: #ffffff; + } + + .subheading { + font-size: 14px; + color: #cccccc; + font-family: sans-serif; + font-weight: bold; + padding: 0 0 0 0; + text-transform: uppercase; + letter-spacing: 1px; + } + + .h1 { + font-family: sans-serif; + font-size: 48px; + font-weight: bold; + line-height: 56px; + color: #ffffff; + padding: 0 0 0 0; + } + + .h2 { + font-family: sans-serif; + font-size: 18px; + font-weight: bold; + color: #444444; + padding: 0 0 0 0; + text-transform: uppercase; + letter-spacing: 0.5px; + } + + .h3 { + font-family: sans-serif; + font-size: 24px; + font-weight: regular; + color: #555555; + padding: 0 0 0 0; + } + + .h4 { + font-family: sans-serif; + font-size: 18px; + font-weight: bold; + color: #666666; + padding: 0 0 0 0; + } + + .paragraph { + font-family: sans-serif; + font-size: 14px; + line-height: 22px; + color: #666666; + font-weight: 200; + padding: 20px 0 0 0; + } + + .listitem { + font-family: sans-serif; + font-size: 15px; + color: #666666; + font-weight: 200; + padding: 0 0 20px 0; + } + + .smalltext { + font-family: sans-serif; + font-size: 14px; + color: #cccccc; + padding: 3px 0 0 0; + } + + .borderbottom { + border-bottom: 1px solid #f2eeed; + } + + /*Media Queries*/ + @media only screen and (max-width: 651px) { + .columns { + width: 100% !important; + } + + .columncontainer { + display: block !important; + width: 100% !important; + } + + .paragraph, + .listitem { + font-size: 18px; + } + + .link { + float: left; + } + } + + @media only screen and (min-width: 651px) { + .content { + width: 650px !important; + } + } +
- - - - -
- - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- - - -
- Alda Hotels - - - - -
- - - - -
- - - - - -
-
-
- - - - - - - - - - - - - -
Confirmación de reserva en - ${object.company_id.display_name}
-

__

-
Hola ${object.partner_id.firstname}
- Tu reserva en ${object.company_id.display_name} queda confirmada. Te esperamos el día ${object.room_lines[0].checkin[8:10]} del ${object.room_lines[0].checkin[5:7]} de - ${object.room_lines[0].checkin[0:4]}. Si podemos ayudarte en cualquier tipo de gestión, no dudes en hacérnoslo saber.
-
- - - - -
- -
Contactar -
-
-
-
-
- - - - - -
- - - - -
- - - - - - - - - - - - - -
¿Llegarás más - tarde de las 17:00 horas?
-

__

-
En ese caso te rogamos que te pongas en contacto con nosotros para facilitarte las instrucciones - necesarias.
-
- - - - -
- - -
Contactar -
-
- -
-
-
-
- - - - -
- - - - -
- - - - - - - -
- Servicios
- - - - - - - - - - - - - - - - - -
- Info - Información turística
- Wifi - Wi-Fi gratuito
- Restauracion - Restauración
- Parking - Parking concertado
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - -
- - - - -
- Alda Hotels -
-
- - - - - - -
- - - - - - - - - - - - - - - - - - -
Datos de tu reserva
- ${object.partner_id.name} -
- % if object.partner_id.contact_address: - ${object.partner_id.contact_address}
- % endif - % if object.partner_id.phone: - Tel.: ${object.partner_id.phone}
- % endif - % if object.partner_id.mobile: - Mov.: ${object.partner_id.mobile}
- % endif -
- % for rline in object.get_grouped_reservations_json('confirm'): - - ${rline['num']} x ${rline['room_type']['name']} - % if rline['childrens'] == 0: - (${rline['adults']} Adultos) - % else: - (${rline['adults']} Adultos + ${rline['childrens']} Niños) +
+ + + - - - - - - -
+ + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + + +
+ Alda Hotels + + + + +
+ + + + +
+ + + + + +
+
+
+ + + + + + + + + + + + + +
Confirmación de reserva + en + ${object.company_id.property_name}
+

__

+
Hola ${object.partner_id.firstname}
+ Tu reserva en ${object.company_id.property_name} queda confirmada. Te esperamos el día ${object.room_lines[0].checkin[8:10]} del ${object.room_lines[0].checkin[5:7]} de + ${object.room_lines[0].checkin[0:4]}. Si podemos ayudarte en cualquier tipo de gestión, no dudes en hacérnoslo saber.
+
+ + + + +
+ +
Contactar +
+
+
+
+
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + +
¿Llegarás más + tarde de las 17:00 horas?
+

__

+
En ese caso te rogamos que te pongas en contacto con nosotros para facilitarte las instrucciones + necesarias.
+
+ + + + +
+ + +
Contactar +
+
+ +
+
+
+
+ + + + +
+ + + + +
+ + + + + + + +
+ Servicios
+ + + + + + + + + + + + + + + + + +
+ Info + Información turística
+ Wifi + Wi-Fi gratuito
+ Restauracion + Restauración
+ Parking + Parking
+
+
+
+
+
+ + + + - -
+ + + + +
+ Alda Hotels +
+
+ + + - -
+ + + + + + + + + - - - -
Datos de tu + reserva
+ ${object.partner_id.name} +
+ % if object.partner_id.contact_address: + ${object.partner_id.contact_address}
+ % endif + % if object.partner_id.phone: + Tel.: ${object.partner_id.phone}
+ % endif + % if object.partner_id.mobile: + Mov.: ${object.partner_id.mobile}
% endif
- - % endfor + % for rline in object.get_grouped_reservations_json('confirm'): + + ${rline['num']} x ${rline['room_type']['name']} + % if rline['childrens'] == 0: + (${rline['adults']} Adultos) + % else: + (${rline['adults']} Adultos + ${rline['childrens']} Niños) + % endif +
+
+ Entrada: ${format_tz(rline['checkin']+ ' 00:00:00', format="%d de %B de %Y")}
+ Salida: ${format_tz(rline['checkout']+ ' 00:00:00', format="%d de %B de %Y")}
+ Nº de noches: ${rline['nights']}

-
+ % endfor - Recuerda que puedas cancelar gratuitamente esta reserva hasta las 12:00 h del día anterior a tu llegada. -
-
-
-
- - - + +
- - - - - - - - + +
Mapa
- - - - - -
- Ver mapa -
-

-
- -

+
+

Información importante

+ En caso de cancelar tu reserva, podrás hacerlo de manera gratuita hasta las 23:59 horas del día anterior a tu llegada. +
Esta reserva está sujeta al pago de la primera noche antes de las 15:00 h del día de entrada. En caso que la tarjeta no sea válida, nos pondremos en contacto contigo para que nos facilites un nuevo método de pago. De no poder verificar correctamente la tarjeta, tu reserva podrá ser cancelada.
+ En reservas con tarifas no reembolsables no se podrá ni cancelar ni modificar, por ello no se reembolsará el dinero. En este tipo de tarifas, se procederá a cargar el importe total de la reserva en el momento de su confirmación, en la tarjeta facilitada. +
+ + +
+
+
+
+ + + - -
+ + + + + + + + - -
Mapa
+ + + + + +
+ Ver mapa
-

- - - - -
- - - - -
- - -
-
-
-
-
- - - - - -
- - - - -
- Importes -
-
- - - - -
- - - - - - - - - - - - -
IMPORTES
- Noches: ${object.get_grouped_reservations_json('confirm')|sum(attribute='nights')} -
- Base imponible: ${object.amount_untaxed} €
- I.V.A (10%): ${object.amount_tax} €
- Precio total: ${object.amount_total} €
-
-
-
-
-
- - - - - -
- - - - -
- Habitacion -
-
- - - - -
-
-
Información de la - habitación
- % set room_type_ids = object.room_lines.filtered('to_send').mapped('room_type_id.id') - % set room_types = user.env['hotel.room.type'].browse(room_type_ids) - % for room_type in room_types: - - % if room_type.product_id.name: -
- ${room_type.product_id.name} -
- % else: -
- Habitación ${loop.index} -
- % endif -
- Esta habitación cuenta con TV, Wi-Fi gratuita, calefacción y baño privado. -
- % endfor -
-
-
-
- - - - - -
- - - - -
- Peticiones -
-
- - - - -
- - - - - - - - - - - - -
Peticiones especiales
- Estamos a tu servicio -
- [[petición]] -
-
-
-
-
- - - - -
- - - - -
- - - - - - - - - - - -
Información - adicional
- - -

__

- -
-
-
-
-
- - - - - -
- - - - -
- Coche -
-
- - - - -
- - - - - - - - - - - - -
Cómo acceder
- En coche -


- Pulse en este enlace, para - conocer como llegar desde su ubicación actual + +

+

- Si vienes en coche, queremos informarte de que nos encontramos en una calle peatonal. Para aparcar, te recomendamos nuestro parking concertado, a tan sólo 3 minutos caminando. Es el - Parking La Salle, en la calle Ramón del Valle Inclán. Tiene un coste de 10€/día por ser cliente de Alda Hotels. -
-
-
-
- - - - - -
- - - - -
- Bus -
-
- - - - -
- - - - - - - - - - - - -
Cómo acceder
- En autobús o tren -
Si vienes en autobús nos encontramos a 15 minutos caminando. Si prefieres coger un bus urbano, te recomendamos las líneas - P1 y P2 y parar en la Praciña das Penas. Desde la parada solo tendrás que caminar 2 minutos.

- Si llegas a la ciudad en tren, puedes coger las líneas de bus C5, C6, 6 o 9, y parar en Praciña das Penas, muy cerca de nuestra ubicación.
-
-
-
-
- - - + + + + + + + + - -
- - - + +
- - - + +
- - - - - - - - - + +
${object.company_id.city}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac lobortis sem. Donec in tincidunt diam, id - ultrices risus. Fusce ultrices posuere lectus vitae commodo.
- - - + +
- - - + +
+
+
+
+
+ + + + + +
+ + + + +
+ Importes +
+
+ + + + +
+ + + + + + + + + + + + +
IMPORTES
+ Noches: ${object.get_grouped_reservations_json('confirm')|sum(attribute='nights')} +
+ Base imponible: ${object.amount_untaxed} €
+ I.V.A (10%): ${object.amount_tax} €
+ Precio total: ${object.amount_total} €
+
+
+
+
+
+ + + + - -
+ + + + +
+ Habitacion +
+
+ + + - -
+
+
Información de la + habitación
+ % set room_type_ids = object.room_lines.filtered('to_send').mapped('room_type_id.id') + % set room_types = user.env['hotel.room.type'].browse(room_type_ids) + % for room_type in room_types: + + % if room_type.product_id.name: +
+ ${room_type.product_id.name} +
+ % else: +
+ Habitación ${loop.index} +
+ % endif +
+ Esta habitación cuenta con TV, Wi-Fi gratuita, calefacción y baño privado. +
+ % endfor
- -
-
-
-
-
- - - - -
- -
-
- - - - -
- -
-
- - - - -
- - - - -
- - - - - - - - - -
${object.company_id.display_name}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac lobortis sem. Donec in tincidunt - diam, id ultrices risus. Fusce ultrices posuere lectus vitae commodo. Nulla facilisi. Donec condimentum gravida ex et dapibus.
-
-
-
-
- - - - -
- - - - - - - - - -
NUESTRAS REDES SOCIALES
-
-
- - - - - - - - - - -
- - - + - - -
- - - - - - - - - + +
- - Facebook - -
- Facebook
- - - + +
+
+
+
-
Toda la actualidad de nuestros alojamientos, así como ofertas y promociones.
- - - - -
- - -
Dale - a Me gusta
-
- -
-
-
-
- - - - -
- - - - - - - - - - - - - - - - -
- - Instagram - -
- Instagram
- - - - -
-
-
Cada detalle cuenta, y es por eso que tratamos de reflejarlo en nuestras fotos.
- - - - -
- - -
#Entra -
-
- -
-
-
-
- - - - -
- - - - - - - - - - - - - - - - -
- - Twitter - -
- Twitter
- - - - -
-
-
Propuestas al minuto para hacer de tu viaje una experiencia inmejorable.
- - - - -
- - -
Síguenos -
-
- -
-
-
-
-
- - - - - - -
¡Muchas gracias por alojarte - con nosotros!
-
- - - -
- Alda Hotels - - - -
-
- +
+ + + + +
+ + + + +
+ + + + + + + + + + + +
Información + adicional
+ + +

__

+ +
+
+
+
+
+ + + + + +
+ + + + +
+ Coche +
+
+ + + + +
+ + + + + + + + + + + + +
Cómo acceder
+ En coche +
+

+
+ Pulse en este enlace, + para + conocer como llegar desde su ubicación actual +

+ +

Si vienes en coche, podrás aparcar en los alrededores del hotel, aunque la zona de playa cuenta con zona azul. También disponemos de parking propio para clientes (bajo disponibilidad).

+
+
+
+
+ + + + + +
+ + + + +
+ Bus +
+
+ + + + +
+ + + + + + + + + + + + +
Cómo acceder
+ En autobús o tren +
Si vienes en autobús podrás venir desde A Coruña en las líneas 20, 22 y 1A, que te dejarán cerca de Ponte da Pasaxe. Desde allí, tendrás unos 15 minutos andando hasta el hotel.
+
+
+
+
+ + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + +
${object.company_id.city}
Santa Cristina es un lugar privilegiado. Playas de arena fina y blanca, paisajes impresionantes y unos alrededores dignos de conocer.
+ + + + +
+ + + +
+
+
+
+
+ + + + +
+ +
+
+ + + + +
+ +
+
+ + + + +
+ + + + +
+ + + + + + + + + +
${object.company_id.property_name}
El Hotel Alda Santa Cristina se encuentra a pie de playa, por lo que disfruta de unas vistas impresionantes de la ría de O Burgo. Además, a escasos minutos en coche, podrás estar en el centro de A Coruña.
+
+
+
+
+ + + + +
+ + + + + + + + + +
NUESTRAS REDES SOCIALES
+
+
+ + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + +
+ + Facebook + +
+ Facebook
+ + + + +
+ +
+
Toda la actualidad de nuestros alojamientos, así como ofertas y promociones.
+ + + + +
+ + +
Dale + a Me gusta
+
+ +
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + +
+ + Instagram + +
+ Instagram
+ + + + +
+ +
+
Cada detalle cuenta, y es por eso que tratamos de reflejarlo en nuestras fotos.
+ + + + +
+ + +
#Entra +
+
+ +
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + +
+ + Twitter + +
+ Twitter
+ + + + +
+ +
+
Propuestas al minuto para hacer de tu viaje una experiencia inmejorable.
+ + + + +
+ + +
Síguenos +
+
+ +
+
+
+
+
+ + + + + + +
¡Muchas gracias por + alojarte + con nosotros!
+
+ + + +
+ Alda Hotels + + + +
+
+
- - - - -
- + + + ]]>
From 210e8a8fc5b3a6af7af8c7bbcc1853edf3c7cc7c Mon Sep 17 00:00:00 2001 From: Jose Luis Date: Wed, 20 Mar 2019 12:43:07 +0100 Subject: [PATCH 3/5] [FIX] CSS and PDF in hotel_l10n_es --- hotel_l10n_es/README.rst | 0 hotel_l10n_es/__init__.py | 0 hotel_l10n_es/__manifest__.py | 3 ++- hotel_l10n_es/data/code.ine.csv | 0 hotel_l10n_es/data/report_viajero_paperformat.xml | 0 hotel_l10n_es/data/tourism.category.csv | 0 hotel_l10n_es/i18n/es.po | 0 hotel_l10n_es/models/__init__.py | 0 hotel_l10n_es/models/category_type.py | 0 hotel_l10n_es/models/code_ine.py | 0 .../models/inherit_hotel_checkin_partner.py | 0 hotel_l10n_es/models/inherit_res_company.py | 0 hotel_l10n_es/models/inherit_res_partner.py | 0 hotel_l10n_es/report/report_parte_viajero.xml | 0 hotel_l10n_es/security/ir.model.access.csv | 0 hotel_l10n_es/static/src/css/hotel_l10n_es.css | 5 +++++ hotel_l10n_es/views/category_tourism.xml | 0 hotel_l10n_es/views/code_ine.xml | 0 hotel_l10n_es/views/hotel_l10n_es_hotel_name.xml | 13 +++++++++++++ .../views/inherit_hotel_checkin_partner_views.xml | 0 hotel_l10n_es/views/inherit_res_company.xml | 0 hotel_l10n_es/views/inherit_res_partner.xml | 0 hotel_l10n_es/views/report_viajero.xml | 0 hotel_l10n_es/views/report_viajero_data.xml | 0 hotel_l10n_es/views/report_viajero_document.xml | 10 +++++----- hotel_l10n_es/views/report_viajero_document_new.xml | 0 hotel_l10n_es/views/report_viajero_head.xml | 0 hotel_l10n_es/wizard/__init__.py | 0 hotel_l10n_es/wizard/ine_wizard.py | 0 hotel_l10n_es/wizard/ine_wizard.xml | 0 hotel_l10n_es/wizard/police_wizard.py | 0 hotel_l10n_es/wizard/police_wizard.xml | 0 32 files changed, 25 insertions(+), 6 deletions(-) mode change 100644 => 100755 hotel_l10n_es/README.rst mode change 100644 => 100755 hotel_l10n_es/__init__.py mode change 100644 => 100755 hotel_l10n_es/__manifest__.py mode change 100644 => 100755 hotel_l10n_es/data/code.ine.csv mode change 100644 => 100755 hotel_l10n_es/data/report_viajero_paperformat.xml mode change 100644 => 100755 hotel_l10n_es/data/tourism.category.csv mode change 100644 => 100755 hotel_l10n_es/i18n/es.po mode change 100644 => 100755 hotel_l10n_es/models/__init__.py mode change 100644 => 100755 hotel_l10n_es/models/category_type.py mode change 100644 => 100755 hotel_l10n_es/models/code_ine.py mode change 100644 => 100755 hotel_l10n_es/models/inherit_hotel_checkin_partner.py mode change 100644 => 100755 hotel_l10n_es/models/inherit_res_company.py mode change 100644 => 100755 hotel_l10n_es/models/inherit_res_partner.py mode change 100644 => 100755 hotel_l10n_es/report/report_parte_viajero.xml mode change 100644 => 100755 hotel_l10n_es/security/ir.model.access.csv create mode 100755 hotel_l10n_es/static/src/css/hotel_l10n_es.css mode change 100644 => 100755 hotel_l10n_es/views/category_tourism.xml mode change 100644 => 100755 hotel_l10n_es/views/code_ine.xml create mode 100755 hotel_l10n_es/views/hotel_l10n_es_hotel_name.xml mode change 100644 => 100755 hotel_l10n_es/views/inherit_hotel_checkin_partner_views.xml mode change 100644 => 100755 hotel_l10n_es/views/inherit_res_company.xml mode change 100644 => 100755 hotel_l10n_es/views/inherit_res_partner.xml mode change 100644 => 100755 hotel_l10n_es/views/report_viajero.xml mode change 100644 => 100755 hotel_l10n_es/views/report_viajero_data.xml mode change 100644 => 100755 hotel_l10n_es/views/report_viajero_document.xml mode change 100644 => 100755 hotel_l10n_es/views/report_viajero_document_new.xml mode change 100644 => 100755 hotel_l10n_es/views/report_viajero_head.xml mode change 100644 => 100755 hotel_l10n_es/wizard/__init__.py mode change 100644 => 100755 hotel_l10n_es/wizard/ine_wizard.py mode change 100644 => 100755 hotel_l10n_es/wizard/ine_wizard.xml mode change 100644 => 100755 hotel_l10n_es/wizard/police_wizard.py mode change 100644 => 100755 hotel_l10n_es/wizard/police_wizard.xml diff --git a/hotel_l10n_es/README.rst b/hotel_l10n_es/README.rst old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/__init__.py b/hotel_l10n_es/__init__.py old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/__manifest__.py b/hotel_l10n_es/__manifest__.py old mode 100644 new mode 100755 index e6b49f5c0..1889e9ea5 --- a/hotel_l10n_es/__manifest__.py +++ b/hotel_l10n_es/__manifest__.py @@ -34,6 +34,7 @@ 'partner_contact_gender', 'partner_contact_birthdate', 'partner_firstname', + 'web_responsive' ], 'data': [ 'data/code.ine.csv', @@ -53,7 +54,7 @@ 'views/report_viajero_head.xml', 'views/report_viajero_data.xml', 'views/report_viajero.xml', - 'static/src/xml/hotel_l10n_es_templates.xml' + 'views/hotel_l10n_es_hotel_name.xml' ], 'test': [ ], diff --git a/hotel_l10n_es/data/code.ine.csv b/hotel_l10n_es/data/code.ine.csv old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/data/report_viajero_paperformat.xml b/hotel_l10n_es/data/report_viajero_paperformat.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/data/tourism.category.csv b/hotel_l10n_es/data/tourism.category.csv old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/i18n/es.po b/hotel_l10n_es/i18n/es.po old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/models/__init__.py b/hotel_l10n_es/models/__init__.py old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/models/category_type.py b/hotel_l10n_es/models/category_type.py old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/models/code_ine.py b/hotel_l10n_es/models/code_ine.py old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/models/inherit_hotel_checkin_partner.py b/hotel_l10n_es/models/inherit_hotel_checkin_partner.py old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/models/inherit_res_company.py b/hotel_l10n_es/models/inherit_res_company.py old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/models/inherit_res_partner.py b/hotel_l10n_es/models/inherit_res_partner.py old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/report/report_parte_viajero.xml b/hotel_l10n_es/report/report_parte_viajero.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/security/ir.model.access.csv b/hotel_l10n_es/security/ir.model.access.csv old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/static/src/css/hotel_l10n_es.css b/hotel_l10n_es/static/src/css/hotel_l10n_es.css new file mode 100755 index 000000000..0df19d423 --- /dev/null +++ b/hotel_l10n_es/static/src/css/hotel_l10n_es.css @@ -0,0 +1,5 @@ +#odooAppDrawer{background: #FFFFFF url(../img/watermark.jpg) no-repeat fixed center} +tbody tr td div.o_datepicker.o_form_field_date.o_form_field.o_form_required{max-width: 9.5em} +.title-hotel-name{font-size: 20px;position: absolute;text-align: center;width: 100%;color: #45c2b1;font-weight: bold;z-index: -1;} +.title-hotel-name2{font-size: 20px;position: absolute;text-align: center;width: 100%;color: #45c2b1;font-weight: bold;z-index: -1;} +body {background-color: blue;} diff --git a/hotel_l10n_es/views/category_tourism.xml b/hotel_l10n_es/views/category_tourism.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/views/code_ine.xml b/hotel_l10n_es/views/code_ine.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/views/hotel_l10n_es_hotel_name.xml b/hotel_l10n_es/views/hotel_l10n_es_hotel_name.xml new file mode 100755 index 000000000..c808e8ebd --- /dev/null +++ b/hotel_l10n_es/views/hotel_l10n_es_hotel_name.xml @@ -0,0 +1,13 @@ + + + + diff --git a/hotel_l10n_es/views/inherit_hotel_checkin_partner_views.xml b/hotel_l10n_es/views/inherit_hotel_checkin_partner_views.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/views/inherit_res_company.xml b/hotel_l10n_es/views/inherit_res_company.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/views/inherit_res_partner.xml b/hotel_l10n_es/views/inherit_res_partner.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/views/report_viajero.xml b/hotel_l10n_es/views/report_viajero.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/views/report_viajero_data.xml b/hotel_l10n_es/views/report_viajero_data.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/views/report_viajero_document.xml b/hotel_l10n_es/views/report_viajero_document.xml old mode 100644 new mode 100755 index bee853c8d..e3b6f194f --- a/hotel_l10n_es/views/report_viajero_document.xml +++ b/hotel_l10n_es/views/report_viajero_document.xml @@ -16,10 +16,10 @@ , at

-

+

Traveler's signature

-

-

En nombre de la empresa +

+

En nombre de la empresa GRUPO ALDA HOTELS compuesto por Alda Rías Baixas SL, Alda Compostela SL, Alda Castilla SL, Hoteles Rías Altas SL, Comphostel Gestión Patrimonial SL y Consultores Hoteleros Integrales SL, tratamos la información que nos facilita, con el fin de prestarle el servicio solicitado y realizar la facturación del mismo. Se conservarán mientras se mantenga la relación comercial o durante los años necesarios para cumplir con las obligaciones legales. No se cederán a terceros salvo en los casos en que exista una @@ -46,8 +46,8 @@

COPY TO THE USER

-

-

En nombre de la empresa +

+

En nombre de la empresa GRUPO ALDA HOTELS compuesto por Alda Rías Baixas SL, Alda Compostela SL, Alda Castilla SL, Hoteles Rías Altas SL, Comphostel Gestión Patrimonial SL y Consultores Hoteleros Integrales SL, tratamos la información que nos facilita, con el fin de prestarle el servicio solicitado y realizar la facturación del mismo. Se conservarán mientras se mantenga la relación comercial o durante los años necesarios para cumplir con las obligaciones legales. No se cederán a terceros salvo en los casos en que exista una diff --git a/hotel_l10n_es/views/report_viajero_document_new.xml b/hotel_l10n_es/views/report_viajero_document_new.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/views/report_viajero_head.xml b/hotel_l10n_es/views/report_viajero_head.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/wizard/__init__.py b/hotel_l10n_es/wizard/__init__.py old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/wizard/ine_wizard.py b/hotel_l10n_es/wizard/ine_wizard.py old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/wizard/ine_wizard.xml b/hotel_l10n_es/wizard/ine_wizard.xml old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/wizard/police_wizard.py b/hotel_l10n_es/wizard/police_wizard.py old mode 100644 new mode 100755 diff --git a/hotel_l10n_es/wizard/police_wizard.xml b/hotel_l10n_es/wizard/police_wizard.xml old mode 100644 new mode 100755 From 2ab1663cb2d6ea7603a3e5294aa5bcfbf39a5aa9 Mon Sep 17 00:00:00 2001 From: Jose Luis Date: Wed, 20 Mar 2019 19:30:12 +0100 Subject: [PATCH 4/5] [ADD] Door Codes in Hotels --- hotel_door_codes/README.rst | 13 +++ hotel_door_codes/__init__.py | 22 +++++ hotel_door_codes/__manifest__.py | 47 +++++++++++ hotel_door_codes/data/menus.xml | 13 +++ hotel_door_codes/models/__init__.py | 23 ++++++ .../models/inherit_hotel_reservation.py | 71 ++++++++++++++++ .../models/inherit_res_company.py | 29 +++++++ hotel_door_codes/static/description/icon.png | Bin 0 -> 24484 bytes .../views/inherit_hotel_reservation.xml | 23 ++++++ .../views/inherit_report_viajero.xml | 14 ++++ .../views/inherit_res_company.xml | 18 ++++ hotel_door_codes/wizard/__init__.py | 21 +++++ hotel_door_codes/wizard/door_code.py | 78 ++++++++++++++++++ hotel_door_codes/wizard/door_code.xml | 33 ++++++++ .../views/report_viajero_document.xml | 2 + 15 files changed, 407 insertions(+) create mode 100644 hotel_door_codes/README.rst create mode 100644 hotel_door_codes/__init__.py create mode 100644 hotel_door_codes/__manifest__.py create mode 100644 hotel_door_codes/data/menus.xml create mode 100644 hotel_door_codes/models/__init__.py create mode 100644 hotel_door_codes/models/inherit_hotel_reservation.py create mode 100644 hotel_door_codes/models/inherit_res_company.py create mode 100644 hotel_door_codes/static/description/icon.png create mode 100644 hotel_door_codes/views/inherit_hotel_reservation.xml create mode 100644 hotel_door_codes/views/inherit_report_viajero.xml create mode 100644 hotel_door_codes/views/inherit_res_company.xml create mode 100644 hotel_door_codes/wizard/__init__.py create mode 100644 hotel_door_codes/wizard/door_code.py create mode 100644 hotel_door_codes/wizard/door_code.xml diff --git a/hotel_door_codes/README.rst b/hotel_door_codes/README.rst new file mode 100644 index 000000000..39b189275 --- /dev/null +++ b/hotel_door_codes/README.rst @@ -0,0 +1,13 @@ +DOOR CODES +========== + +Generate HOTEL DOOR CODES + + +Credits +======= + +Creator +------------ + +* Jose Luis Algara Toledo diff --git a/hotel_door_codes/__init__.py b/hotel_door_codes/__init__.py new file mode 100644 index 000000000..d81805226 --- /dev/null +++ b/hotel_door_codes/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2018-2019 Jose Luis Algara Toledo +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## +from . import models +from . import wizard diff --git a/hotel_door_codes/__manifest__.py b/hotel_door_codes/__manifest__.py new file mode 100644 index 000000000..299e75b83 --- /dev/null +++ b/hotel_door_codes/__manifest__.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Odoo, Open Source Management Solution +# Copyright (C) 2018-2019 Jose Luis Algara Toledo +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +{ + 'name': 'Hotel Door Codes', + 'version': '2.1', + 'author': "Jose Luis Algara Toledo ", + 'website': 'https://www.aldahotels.com', + 'category': 'hotel code', + 'summary': "Generate Hotel door codes, in Pseudo random system", + 'description': "Hotel Door Codes", + 'depends': [ + 'hotel', 'hotel_l10n_es' + ], + 'data': [ + 'wizard/door_code.xml', + 'data/menus.xml', + 'views/inherit_res_company.xml', + 'views/inherit_hotel_reservation.xml', + 'views/inherit_report_viajero.xml', + ], + 'qweb': [], + 'test': [ + ], + 'installable': True, + 'auto_install': False, + 'application': False, + 'license': 'AGPL-3', +} diff --git a/hotel_door_codes/data/menus.xml b/hotel_door_codes/data/menus.xml new file mode 100644 index 000000000..ce3b25d84 --- /dev/null +++ b/hotel_door_codes/data/menus.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/hotel_door_codes/models/__init__.py b/hotel_door_codes/models/__init__.py new file mode 100644 index 000000000..71658e650 --- /dev/null +++ b/hotel_door_codes/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2018-2019 Alda Hotels +# Jose Luis Algara +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## +from . import inherit_res_company +from . import inherit_hotel_reservation diff --git a/hotel_door_codes/models/inherit_hotel_reservation.py b/hotel_door_codes/models/inherit_hotel_reservation.py new file mode 100644 index 000000000..0ed077f4f --- /dev/null +++ b/hotel_door_codes/models/inherit_hotel_reservation.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2018-2019 Alda Hotels +# Jose Luis Algara +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp import models, fields, api +from datetime import datetime, date, time, timedelta +from openerp.tools import DEFAULT_SERVER_DATE_FORMAT + + +class Inherit_hotel_reservation(models.Model): + _inherit = 'hotel.reservation' + + @api.multi + def doorcode4(self, fecha): + # Calculate de Door Code... need a date in String format "%Y-%m-%d" + compan = self.env.user.company_id + d = datetime.strptime(fecha, DEFAULT_SERVER_DATE_FORMAT) + dia_semana = datetime.weekday(d) # Dias a restar y ponerlo en lunes + d = d - timedelta(days=dia_semana) + dtxt = d.strftime('%s.%%06d') % d.microsecond + dtxt = compan.precode + dtxt[4:8] + compan.postcode + return dtxt + + @api.multi + def _compute_door_codes(self): + for res in self: + entrada = datetime.strptime( + res.checkin[:10], DEFAULT_SERVER_DATE_FORMAT) + if datetime.weekday(entrada) == 0: + entrada = entrada + timedelta(days=1) + salida = datetime.strptime( + res.checkout[:10], DEFAULT_SERVER_DATE_FORMAT) + if datetime.weekday(salida) == 0: + salida = salida - timedelta(days=1) + codes = (u'Código de entrada: ' + + '' + + res.doorcode4(datetime.strftime(entrada, "%Y-%m-%d")) + + '') + while entrada <= salida: + if datetime.weekday(entrada) == 0: + codes += ("
" + + u'Cambiará el Lunes ' + + datetime.strftime(entrada, "%d-%m-%Y") + + ' a: ' + + res.doorcode4(datetime.strftime( + entrada, "%Y-%m-%d")) + + '') + entrada = entrada + timedelta(days=1) + res.door_codes = codes + + door_codes = fields.Html(u'Códigos de entrada', + compute='_compute_door_codes') + box_number = fields.Integer ('Numero de Caja') + box_code = fields.Char ('Cod. Caja') diff --git a/hotel_door_codes/models/inherit_res_company.py b/hotel_door_codes/models/inherit_res_company.py new file mode 100644 index 000000000..181d6424c --- /dev/null +++ b/hotel_door_codes/models/inherit_res_company.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2018-2019 Alda Hotels +# Jose Luis Algara +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## +from openerp import models, fields, api + + +class Inherit_res_company(models.Model): + _inherit = 'res.company' + + precode = fields.Char('Characters before the door code', default='') + postcode = fields.Char('Characters after the code', default='') diff --git a/hotel_door_codes/static/description/icon.png b/hotel_door_codes/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..0d7c99f06fafe4f012cab618e056e8652ec140d5 GIT binary patch literal 24484 zcmb@t1yq$?*DkyP5di@a5djJ5?rx-8V$_tq>EhIf1O_V+5 zRg65XjJSxfz(*xma1)>4;gFnAsVbxEYz5=$V*#n3;H3n27)Rj|8;l zXl%-(Br5(-Ti}VG#N650o`;dq&CQL$jg`U9(TtIqo12@FiG`7cg&vfkck-}xHgKo6 zbt3)O7eq~*j2tcOoh|HaiD6$fFtl@V<|hG`{_TQ|y`0>?KWyvt&p?48V{|vLXJlqz zVzjY=_3OU0le3b^f6VwFOFOA}*qbmanK;?GI2wWZFeUw0WiWRC=Z0Vffi*k|juv22 z46H@%j9hF?Y@MY<`ANVp48|75JZ$XThFnIh2J~#)YzFk4Mr`c#+$aofCN3jGl7H$O|KE-uBQS~)wpjj`#q+OMU`4|I`R}a&9{#J%GkI|+@%kfXG~~ck+SgEg1`-zh3vFV1WnP5>e&xec z>XLa?gU1b(Gg7Win$JiRQrk_Mq@NciY0`HTZ*`^1Ve5Wg|MmWnSOxC? z@A2NA{}ld@dG~ey^Z5VR+W$-A|6g1CpNaVQVE!Fyk@F4sT4bN;@@v!W71ehwVwb;L ze>a3Vj)7lxOHDt&gNU8kR(>C`oHCjDM3E8rM^H%)nGj-^!S@lpgh?7L z<_rtS_LTwM+`|!HrM3joeMnfw_saXpb>KV?1m4U_Fmln!Kn0-=J`5<3ry)7T93$95 z1wTG8VGiYOBnMq zc92N87$_vOrzV6Zz=8&Hs9%9XtTM^2NT19ajt)m00j2`$Zc0`VERAGx8U-r#8x=$! zcp;iNjJ088P){|aXNfv-eDHPyVyx_~#zE^3Udo3^e^zs(oP`(SD1pHLQ?ssO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nDNUDT z;rWdLu<+oN;SW%~|ZlH5F+ZcL9^!2r%>JRNF|%p2J*Gn8+)5l$8{Op!0^ zNxuK~x^H}pWl;0&W(BUJj}TwHIYrW;-UxTKC13c=V{|OzmlLtm{OunHJb6u2p|E*A z%EDs}70U7XG~;5)D-S-S*MMFXA$(-`2p<&Y1x}8b48GR{i8V-8$p_ zm+FDaoZ8MOh9lMK^KxHURw~Gvf)!UZxr$VV+eWBn!LpzT!+#XlwbB&GD~gtoyg&@7 z*a6l=)itp7@1@XxH^Mdlrx9Jsg<@)ePNTw`f7e{Y2vBnKPq*(iKdAFRr9uBa5$gOy zw;#s*zMlUx<`3O|Sp2`ry}zv!ZRCe;-`5Gk;{VwWNUHz69b_T?@9iMV@PBXT2l9U3 z4seV-uOj{5!=WDkDxCVSoh(!@eT;r_;{cR?Vic3F9kl2BBv#`raM&(>JAMkD&yL^C zf#SgD<{(GFRxPw!;CSs6{PFMY@aHc6?;r8n;iFZ!e|>a%$tsL+Y17xu<=2#9KFo5b KjTy_-E#^N^!qF`N literal 0 HcmV?d00001 diff --git a/hotel_door_codes/views/inherit_hotel_reservation.xml b/hotel_door_codes/views/inherit_hotel_reservation.xml new file mode 100644 index 000000000..3c236a4e4 --- /dev/null +++ b/hotel_door_codes/views/inherit_hotel_reservation.xml @@ -0,0 +1,23 @@ + + + + + + + door_code.reservation_form + hotel.reservation + + + + + + + + + + + + + + + diff --git a/hotel_door_codes/views/inherit_report_viajero.xml b/hotel_door_codes/views/inherit_report_viajero.xml new file mode 100644 index 000000000..0e1257ddf --- /dev/null +++ b/hotel_door_codes/views/inherit_report_viajero.xml @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/hotel_door_codes/views/inherit_res_company.xml b/hotel_door_codes/views/inherit_res_company.xml new file mode 100644 index 000000000..b1638a40d --- /dev/null +++ b/hotel_door_codes/views/inherit_res_company.xml @@ -0,0 +1,18 @@ + + + + + + + door_code.config.view_company_form + res.company + + + + + + + + + + diff --git a/hotel_door_codes/wizard/__init__.py b/hotel_door_codes/wizard/__init__.py new file mode 100644 index 000000000..180966b56 --- /dev/null +++ b/hotel_door_codes/wizard/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2018-2019 Jose Luis Algara Toledo +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## +from . import door_code diff --git a/hotel_door_codes/wizard/door_code.py b/hotel_door_codes/wizard/door_code.py new file mode 100644 index 000000000..334be679a --- /dev/null +++ b/hotel_door_codes/wizard/door_code.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Odoo, Open Source Management Solution +# Copyright (C) 2018-2019 Jose Luis Algara Toledo +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## +import datetime +from datetime import datetime, date, time, timedelta +from odoo import api, fields, models, _ +from openerp.tools import DEFAULT_SERVER_DATE_FORMAT + + +class DoorCodeWizard(models.TransientModel): + _name = 'door_code' + + @api.model + def _get_default_date_start(self): + return datetime.now().strftime(DEFAULT_SERVER_DATE_FORMAT) + + date_start = fields.Date("Inicio periodo", + default=_get_default_date_start) + date_end = fields.Date("Fin del periodo", + default=_get_default_date_start) + door_code = fields.Html(u'Código para la puerta') + + @api.multi + def doorcode4(self, fecha): + # Calculate de Door Code... need a date in String format "%Y-%m-%d" + compan = self.env.user.company_id + d = datetime.strptime(fecha, DEFAULT_SERVER_DATE_FORMAT) + dia_semana = datetime.weekday(d) # Dias a restar y ponerlo en lunes + d = d - timedelta(days=dia_semana) + dtxt = d.strftime('%s.%%06d') % d.microsecond + dtxt = compan.precode + dtxt[4:8] + compan.postcode + return dtxt + + @api.multi + def check_code(self): + entrada = datetime.strptime( + self.date_start, DEFAULT_SERVER_DATE_FORMAT) + if datetime.weekday(entrada) == 0: + entrada = entrada + timedelta(days=1) + salida = datetime.strptime( + self.date_end, DEFAULT_SERVER_DATE_FORMAT) + if datetime.weekday(salida) == 0: + salida = salida - timedelta(days=1) + codes = (u'Código de entrada: ' + + '' + + self.doorcode4(self.date_start) + + '') + while entrada <= salida: + if datetime.weekday(entrada) == 0: + codes += ("
" + + u'Cambiará el Lunes ' + + datetime.strftime(entrada, "%d-%m-%Y") + + ' a: ' + + self.doorcode4(datetime.strftime( + entrada, "%Y-%m-%d")) + + '') + entrada = entrada + timedelta(days=1) + + return self.write({ + 'door_code': codes + }) diff --git a/hotel_door_codes/wizard/door_code.xml b/hotel_door_codes/wizard/door_code.xml new file mode 100644 index 000000000..f0506a79c --- /dev/null +++ b/hotel_door_codes/wizard/door_code.xml @@ -0,0 +1,33 @@ + + + + + door_code.view + door_code + +

+ + + + + + + + + + +
+
+
+ + + + + + diff --git a/hotel_l10n_es/views/report_viajero_document.xml b/hotel_l10n_es/views/report_viajero_document.xml index e3b6f194f..e66c18ce7 100755 --- a/hotel_l10n_es/views/report_viajero_document.xml +++ b/hotel_l10n_es/views/report_viajero_document.xml @@ -56,6 +56,8 @@ Asimismo hemos solicitado que confirme esta autorización para ofrecerle nuestros servicios y poder fidelizarle como cliente.

+
+
From b9c1159b37b623870e997f55ee9cbbb0f321a2e6 Mon Sep 17 00:00:00 2001 From: Jose Luis Date: Fri, 22 Mar 2019 19:14:25 +0100 Subject: [PATCH 5/5] [ADD] Gender control and partner link in police generator error --- hotel_l10n_es/wizard/police_wizard.py | 8 ++++++-- hotel_l10n_es/wizard/police_wizard.xml | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hotel_l10n_es/wizard/police_wizard.py b/hotel_l10n_es/wizard/police_wizard.py index 4ee0a847e..d8e85b638 100755 --- a/hotel_l10n_es/wizard/police_wizard.py +++ b/hotel_l10n_es/wizard/police_wizard.py @@ -37,6 +37,7 @@ class PoliceWizard(models.TransientModel): txt_binary = fields.Binary() txt_message = fields.Char() log_police = fields.Char() + error_partner = fields.Many2one('res.partner') @api.one def generate_file(self): @@ -56,6 +57,7 @@ class PoliceWizard(models.TransientModel): if ((line.partner_id.document_type is not False) and (line.partner_id.document_number is not False) and (line.partner_id.firstname is not False) + and (line.partner_id.gender is not False) and (line.partner_id.lastname is not False)): log_police += 1 @@ -101,11 +103,13 @@ class PoliceWizard(models.TransientModel): content += """ """ else: + self.error_partner = line.partner_id + return self.write({ + 'error_partner': line.partner_id.id, 'txt_message': _('Problem generating the file. \ Checkin without data, \ - or incorrect data: - ' + - line.partner_id.name)}) + or incorrect data: ')}) log_police = str(log_police) + _(' records added from ') log_police += str(len(lines)) + _(' records processed.') return self.write({ diff --git a/hotel_l10n_es/wizard/police_wizard.xml b/hotel_l10n_es/wizard/police_wizard.xml index 0fa0e002d..34ddf55a4 100755 --- a/hotel_l10n_es/wizard/police_wizard.xml +++ b/hotel_l10n_es/wizard/police_wizard.xml @@ -26,7 +26,7 @@

-

+