mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] Kellys report to V11
This commit is contained in:
13
kellys_daily_report/README.rst
Normal file
13
kellys_daily_report/README.rst
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
KELLYS DAILY REPORT
|
||||||
|
=============
|
||||||
|
|
||||||
|
Export KELLYS REPORT
|
||||||
|
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Creator
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Jose Luis Algara Toledo <osotranquilo@gmail.com>
|
||||||
22
kellys_daily_report/__init__.py
Normal file
22
kellys_daily_report/__init__.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# OpenERP, Open Source Management Solution
|
||||||
|
# Copyright (C) 2018 Alexandre Díaz <dev@redneboa.es>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
from . import models
|
||||||
|
from . import wizard
|
||||||
49
kellys_daily_report/__manifest__.py
Normal file
49
kellys_daily_report/__manifest__.py
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Odoo, Open Source Management Solution
|
||||||
|
# Copyright (C) 2018 Jose Luis Algara Toledo <osotranquilo@gmail.com>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Hotel Kellys Daily Report',
|
||||||
|
'version': '2.1',
|
||||||
|
'author': "Jose Luis Algara Toledo <osotranquilo@gmail.com>",
|
||||||
|
'website': 'https://www.aldahotels.com',
|
||||||
|
'category': 'hotel report kellys',
|
||||||
|
'summary': "Export daily report in PDF format",
|
||||||
|
'description': "Kellys Daily Report",
|
||||||
|
'depends': [
|
||||||
|
'hotel',
|
||||||
|
],
|
||||||
|
'data': [
|
||||||
|
'data/report_kellys_paperformat.xml',
|
||||||
|
'views/kellys.xml',
|
||||||
|
'wizard/kellys_daily_report.xml',
|
||||||
|
'data/menus.xml',
|
||||||
|
'security/ir.model.access.csv',
|
||||||
|
],
|
||||||
|
'qweb': [],
|
||||||
|
'test': [
|
||||||
|
],
|
||||||
|
'css': ['static/src/css/kellys_daily_report.css'],
|
||||||
|
|
||||||
|
'installable': True,
|
||||||
|
'auto_install': False,
|
||||||
|
'application': False,
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
}
|
||||||
13
kellys_daily_report/data/menus.xml
Normal file
13
kellys_daily_report/data/menus.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<menuitem
|
||||||
|
id="menu_hotel_kellys_report"
|
||||||
|
name="Listado limpieza habitaciones"
|
||||||
|
parent="hotel.hotel_reports_menu"
|
||||||
|
action="report_kellys_act"
|
||||||
|
groups="hotel.group_hotel_user,hotel.group_hotel_manager"
|
||||||
|
sequence="25"
|
||||||
|
/>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
22
kellys_daily_report/data/report_kellys_paperformat.xml
Normal file
22
kellys_daily_report/data/report_kellys_paperformat.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<record id="report_kellys_paperformat" model="report.paperformat">
|
||||||
|
<field name="name">Kellys report</field>
|
||||||
|
<field name="default" eval="True"/>
|
||||||
|
<field name="format">custom</field>
|
||||||
|
<field name="page_height">360</field>
|
||||||
|
<field name="page_width">60</field>
|
||||||
|
<field name="orientation">Portrait</field>
|
||||||
|
<field name="margin_top">1</field>
|
||||||
|
<field name="margin_bottom">3</field>
|
||||||
|
<field name="margin_left">0</field>
|
||||||
|
<field name="margin_right">0</field>
|
||||||
|
<field name="header_line" eval="False"/>
|
||||||
|
<field name="header_spacing">1</field>
|
||||||
|
<field name="dpi">201</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
23
kellys_daily_report/models/__init__.py
Normal file
23
kellys_daily_report/models/__init__.py
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# OpenERP, Open Source Management Solution
|
||||||
|
# Copyright (C) 2017 Alda Hotels <informatica@aldahotels.com>
|
||||||
|
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
from . import kellys
|
||||||
28
kellys_daily_report/models/kellys.py
Normal file
28
kellys_daily_report/models/kellys.py
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# OpenERP, Open Source Management Solution
|
||||||
|
# Copyright (C) 2018 Alda Hotels <informatica@aldahotels.com>
|
||||||
|
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
from openerp import models, fields, api
|
||||||
|
|
||||||
|
|
||||||
|
class KellysNames(models.Model):
|
||||||
|
_name = 'kellysnames'
|
||||||
|
|
||||||
|
name = fields.Char('Limpiador/a')
|
||||||
4
kellys_daily_report/security/ir.model.access.csv
Normal file
4
kellys_daily_report/security/ir.model.access.csv
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||||
|
access_kellys.model_category_manager,access_kellys.manager,kellys_daily_report.model_kellysnames,hotel.group_hotel_manager,1,1,1,1
|
||||||
|
access_kellys.model_category_call,access_kellys.call,kellys_daily_report.model_kellysnames,hotel.group_hotel_call,0,0,0,0
|
||||||
|
access_kellys.model_category_user,access_kellys.user,kellys_daily_report.model_kellysnames,hotel.group_hotel_user,1,1,1,1
|
||||||
|
BIN
kellys_daily_report/static/description/icon.png
Normal file
BIN
kellys_daily_report/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
@@ -0,0 +1 @@
|
|||||||
|
.o_datepicker {max-width: 9.5em}
|
||||||
28
kellys_daily_report/views/kellys.xml
Normal file
28
kellys_daily_report/views/kellys.xml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<record id="tree_kellysnames" model="ir.ui.view">
|
||||||
|
<field name="model">kellysnames</field>
|
||||||
|
<field name="name">kellysnames.tree.view</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree>
|
||||||
|
<field name="name" />
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<act_window
|
||||||
|
id="names_kellys_act"
|
||||||
|
name="Kellys Names"
|
||||||
|
res_model="kellysnames"
|
||||||
|
view_mode="tree,form"
|
||||||
|
/>
|
||||||
|
<menuitem
|
||||||
|
id="menu_hotel_kellys_names"
|
||||||
|
name="Personal de limieza"
|
||||||
|
parent="hotel.menu_hotel_room"
|
||||||
|
action="names_kellys_act"
|
||||||
|
groups="hotel.group_hotel_user,hotel.group_hotel_manager"
|
||||||
|
sequence="45"
|
||||||
|
/>
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
21
kellys_daily_report/wizard/__init__.py
Normal file
21
kellys_daily_report/wizard/__init__.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# OpenERP, Open Source Management Solution
|
||||||
|
# Copyright (C) 2018 Alexandre Díaz <dev@redneboa.es>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
from . import kellys_daily_report
|
||||||
140
kellys_daily_report/wizard/kellys_daily_report.py
Normal file
140
kellys_daily_report/wizard/kellys_daily_report.py
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Odoo, Open Source Management Solution
|
||||||
|
# Copyright (C) 2018 Jose Luis Algara Toledo <osotranquilo@gmail.com>
|
||||||
|
#
|
||||||
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
import datetime
|
||||||
|
from datetime import datetime, date, time
|
||||||
|
from odoo import api, fields, models, _
|
||||||
|
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
|
||||||
|
|
||||||
|
|
||||||
|
class KellysWizard(models.TransientModel):
|
||||||
|
_name = 'kellys'
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _get_default_habitaciones(self):
|
||||||
|
return self.calculalimpiar(datetime.now())
|
||||||
|
|
||||||
|
date_start = fields.Date("Fecha del listado", default=datetime.now())
|
||||||
|
habitaciones = fields.Many2many('kellysrooms', string="Limpieza:",
|
||||||
|
default=_get_default_habitaciones)
|
||||||
|
order = fields.Selection([
|
||||||
|
('kelly ASC', 'Calendario'),
|
||||||
|
('kelly ASC, tipo ASC', 'Limpiar como... y orden en el Calendario'),
|
||||||
|
('kelly ASC, tipo ASC, checkin ASC',
|
||||||
|
'Limpiar como... y Hora de entrada'),
|
||||||
|
], 'Orden de impresión',
|
||||||
|
default='kelly ASC, tipo ASC, checkin ASC',
|
||||||
|
required=True,
|
||||||
|
help='Establece el orden en el que se imprimira el listado')
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def calculate_report(self):
|
||||||
|
self.habitaciones = self.calculalimpiar(
|
||||||
|
datetime.strptime(self.date_start, "%Y-%m-%d"))
|
||||||
|
return
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def calculalimpiar(self, fechalimpieza=datetime.now()):
|
||||||
|
dates = datetime.strftime(fechalimpieza, "%Y-%m-%d")
|
||||||
|
grids = self.env['hotel.room'].search([], order='hcal_sequence ASC')
|
||||||
|
grids2 = self.env['kellysrooms']
|
||||||
|
listid = []
|
||||||
|
for x in grids:
|
||||||
|
rooms = self.env['hotel.reservation'].search(
|
||||||
|
['&', '&', ('checkin', '<=', dates),
|
||||||
|
('checkout', '>=', dates),
|
||||||
|
('state', '<>', 'cancelled'),
|
||||||
|
('room_id', '=', x.id)
|
||||||
|
], order='checkin ASC')
|
||||||
|
# rooms = self.env['hotel.reservation'].search(
|
||||||
|
# ['&', '&', ('checkin', '<=', dates),
|
||||||
|
# ('checkout', '>=', dates),
|
||||||
|
# ('state', '<>', 'cancelled'),
|
||||||
|
# ('product_id', '=', x.product_id.id)
|
||||||
|
# ], order='checkin ASC')
|
||||||
|
tipos = False
|
||||||
|
if len(rooms) != 0:
|
||||||
|
if len(rooms) == 2:
|
||||||
|
tipos = 1
|
||||||
|
# Salida y etrada
|
||||||
|
checkinhour = rooms[1].checkin
|
||||||
|
checkouthour = rooms[1].checkout[:10]
|
||||||
|
else:
|
||||||
|
if rooms[0].checkin[:10] == dates:
|
||||||
|
checkinhour = rooms[0].checkin
|
||||||
|
checkouthour = rooms[0].checkout[:10]
|
||||||
|
tipos = 3
|
||||||
|
# Revisar
|
||||||
|
elif rooms[0].checkout[:10] == dates:
|
||||||
|
checkinhour = 'no prevista'
|
||||||
|
checkouthour = ''
|
||||||
|
tipos = 1
|
||||||
|
# Salida
|
||||||
|
else:
|
||||||
|
checkinhour = rooms[0].checkin[:10]
|
||||||
|
checkouthour = rooms[0].checkout[:10]
|
||||||
|
tipos = 2
|
||||||
|
# Cliente
|
||||||
|
if rooms[0].reservation_type == 'staff':
|
||||||
|
checkinhour = rooms[0].checkin[:10]
|
||||||
|
checkouthour = rooms[0].checkout[:10]
|
||||||
|
tipos = 4
|
||||||
|
# Staff
|
||||||
|
if rooms[0].reservation_type == 'out':
|
||||||
|
checkinhour = rooms[0].checkin[:10]
|
||||||
|
checkouthour = rooms[0].checkout[:10]
|
||||||
|
tipos = 5
|
||||||
|
# Averiada
|
||||||
|
if tipos is not False:
|
||||||
|
listid.append(grids2.create(
|
||||||
|
{'habitacion': rooms[0].room_id.name,
|
||||||
|
'habitacionid': rooms[0].room_id.id,
|
||||||
|
'tipo': tipos,
|
||||||
|
'notas': '',
|
||||||
|
'checkin': checkinhour,
|
||||||
|
# 'checkin': rooms[0].checkin[:10],
|
||||||
|
# 'checkout': rooms[0].checkout[:10],
|
||||||
|
'checkout': checkouthour,
|
||||||
|
# 'kelly': 5,
|
||||||
|
'clean_date': fechalimpieza
|
||||||
|
}).id)
|
||||||
|
return self.env['kellysrooms'].search([('id', 'in', listid)])
|
||||||
|
|
||||||
|
@api.multi
|
||||||
|
def check_report(self):
|
||||||
|
rooms = self.env['kellysrooms'].search([('id', 'in',
|
||||||
|
self.habitaciones.ids)],
|
||||||
|
order=self.order)
|
||||||
|
return self.env['report'].get_action(rooms, 'report.kellys')
|
||||||
|
|
||||||
|
|
||||||
|
class KellysRooms(models.TransientModel):
|
||||||
|
_name = 'kellysrooms'
|
||||||
|
|
||||||
|
habitacion = fields.Char('Habitacion')
|
||||||
|
habitacionid = fields.Integer('Habitacion ID')
|
||||||
|
tipo = fields.Selection([(1, 'Salida'), (2, 'Cliente'), (3, 'Revisar'),
|
||||||
|
(4, 'Staff'), (5, 'Averia')],
|
||||||
|
string='Limpiar como')
|
||||||
|
notas = fields.Char('Notas limpieza')
|
||||||
|
checkin = fields.Char('Entrada')
|
||||||
|
checkout = fields.Char('Salida')
|
||||||
|
kelly = fields.Many2one('kellysnames', string='Asignado a:')
|
||||||
|
clean_date = fields.Date('Clean Date')
|
||||||
236
kellys_daily_report/wizard/kellys_daily_report.xml
Normal file
236
kellys_daily_report/wizard/kellys_daily_report.xml
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
<?xml version="1.0" ?>
|
||||||
|
<odoo>
|
||||||
|
<data>
|
||||||
|
<record id="tree_kellysrooms" model="ir.ui.view">
|
||||||
|
<field name="model">kellysrooms</field>
|
||||||
|
<field name="name">kellysrooms.tree.view</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<tree options='{"bg_color": "black: tipo == 5; orange: tipo == 4; blue: tipo == 3; green: tipo == 2; red: tipo == 1"}' editable="top" create="false">
|
||||||
|
<!-- <tree colors="black: tipo == 5; orange: tipo == 4; blue: tipo == 3; green: tipo == 2; red: tipo == 1" editable="top" create="false"> -->
|
||||||
|
<field name="habitacion" readonly="1"/>
|
||||||
|
<field name="tipo"/>
|
||||||
|
<field name="notas"/>
|
||||||
|
<field name="checkin" readonly="1"/>
|
||||||
|
<field name="checkout" readonly="1"/>
|
||||||
|
<field name="kelly"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<!--Import assets-->
|
||||||
|
<!-- <template id="assets_backend" name="custom assets" inherit_id="web.assets_backend">
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
<link rel="stylesheet" href="/kellys_daily_report/static/src/css/kellys_daily_report.css"/>
|
||||||
|
</xpath>
|
||||||
|
</template> -->
|
||||||
|
<!-- <record model="ir.ui.view" id="kellys_report_view">
|
||||||
|
<field name="name">kellys.daily.report.view</field>
|
||||||
|
<field name="model">kellys</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="kellys Daily Report">
|
||||||
|
<sheet>
|
||||||
|
<group string="Generar PDF de limpieza a fecha:" col="1" colspan="1">
|
||||||
|
<field name="date_start"/>
|
||||||
|
<button name="calculate_report" string="Recalcular" type="object" class="oe_highlight"/>
|
||||||
|
</group>
|
||||||
|
<group colspan="4">
|
||||||
|
<field name="habitaciones"/>
|
||||||
|
</group>
|
||||||
|
<group colspan="2">
|
||||||
|
<field name="order"/>
|
||||||
|
</group>
|
||||||
|
<footer>
|
||||||
|
<button name="check_report" string="Imprimir" type="object" class="oe_highlight"/>
|
||||||
|
</footer>
|
||||||
|
</sheet>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record> -->
|
||||||
|
<act_window id="report_kellys_act" name="Kellys Daily Report Wizard" res_model="kellys" view_mode="form"/>
|
||||||
|
<!-- <report id="action_report_kellys" model="kellysrooms" string="Parte de kellys" report_type="qweb-pdf" name="report.kellys" file="report.kellys"/> -->
|
||||||
|
<!-- <template id="report.kellys">
|
||||||
|
<div class="page">
|
||||||
|
<style>
|
||||||
|
.titulo {
|
||||||
|
font-size: 4.2em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.marco {
|
||||||
|
border-radius: 47px 10px 10px 10px;
|
||||||
|
-moz-border-radius: 47px 10px 10px 10px;
|
||||||
|
-webkit-border-radius: 47px 10px 10px 10px;
|
||||||
|
border: 3px solid #000000;
|
||||||
|
padding: 10px 3px;
|
||||||
|
margin: 3px 0;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.client {
|
||||||
|
border-radius: 10px;
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
border: 1px solid #000000;
|
||||||
|
color: #000000;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.exit {
|
||||||
|
border-radius: 20px 47px 47px 10px;
|
||||||
|
-moz-border-radius: 20px 47px 47px 10px;
|
||||||
|
-webkit-border-radius: 20px 47px 47px 10px;
|
||||||
|
border: 2px solid #000000;
|
||||||
|
padding: 20px 0;
|
||||||
|
color: #000000;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.revise {
|
||||||
|
padding: 20px 0;
|
||||||
|
color: #000000;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.pie {
|
||||||
|
font-size: 0.65em;
|
||||||
|
margin: 0 0 4em;
|
||||||
|
}
|
||||||
|
.tipo {
|
||||||
|
font-size: 3.2em;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.notas {
|
||||||
|
width: 90% !important;
|
||||||
|
margin: 3px 4px;
|
||||||
|
color: #000000;
|
||||||
|
text-align: left;
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
.habitacion {
|
||||||
|
font-size: 3.2em;
|
||||||
|
padding: 0 0 0 3px;
|
||||||
|
}
|
||||||
|
.datos {
|
||||||
|
font-size: 2.4em;
|
||||||
|
}
|
||||||
|
.section {
|
||||||
|
clear: both;
|
||||||
|
padding: 0;
|
||||||
|
margin: 3px 0;
|
||||||
|
}
|
||||||
|
/* COLUMN SETUP */
|
||||||
|
.col {
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
margin: 1% 0 1% 1.6%;
|
||||||
|
}
|
||||||
|
.col:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
/* GROUPING */
|
||||||
|
.group:after,
|
||||||
|
.group:before {
|
||||||
|
content: "";
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
|
.group:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.group {
|
||||||
|
zoom: 1;
|
||||||
|
/* For IE 6/7 */
|
||||||
|
}
|
||||||
|
/* GRID OF TWO */
|
||||||
|
.span_2_of_2 {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.span_1_of_2 {
|
||||||
|
width: 49.2%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<t t-set="actualkelly" t-value="False"/>
|
||||||
|
<t t-set="espie" t-value="False"/>
|
||||||
|
<t t-set="totalkelly" t-value="0"/>
|
||||||
|
<t t-foreach="docs" t-as="o">
|
||||||
|
<t t-if="actualkelly != o.kelly">
|
||||||
|
<t t-if="o_index != 0">
|
||||||
|
<t t-set="espie" t-value="True"/>
|
||||||
|
</t>
|
||||||
|
<t t-set="actualkelly" t-value="o.kelly"/>
|
||||||
|
<t t-if="espie == True">
|
||||||
|
<t t-set="espie" t-value="False"/>
|
||||||
|
<div class="pie">Impreso el
|
||||||
|
<span t-esc="context_timestamp(datetime.datetime.now()).strftime('%d-%m-%Y a las %H:%M')"/>
|
||||||
|
Habitaciones:
|
||||||
|
<t t-esc="totalkelly"/></div>
|
||||||
|
<t t-set="totalkelly" t-value="0"/>
|
||||||
|
<p style="page-break-before:always;"></p>
|
||||||
|
</t>
|
||||||
|
<div class="marco" align="center">
|
||||||
|
<div class="titulo" align="center"><span t-field="o.kelly"/><br/>
|
||||||
|
Habitaciones<br/>
|
||||||
|
<span t-field="o.clean_date" t-field-options='{"format": "d MMMM Y"}'/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
<t t-set="totalkelly" t-value="totalkelly + 1"/>
|
||||||
|
<div t-if="o.tipo == 1" class="exit section group">
|
||||||
|
<div class="habitacion col span_1_of_2">
|
||||||
|
<span t-field="o.habitacion"/>
|
||||||
|
</div>
|
||||||
|
<div class="tipo col span_1_of_2">SALIDA</div>
|
||||||
|
<t t-if="o.checkin != ''">
|
||||||
|
<div class="datos col span_2_of_2">Entrada
|
||||||
|
<span t-field="o.checkin" t-field-options='{"format": "d MMMM"}'/></div>
|
||||||
|
</t>
|
||||||
|
<div class="notas col span_2_of_2" align="left">
|
||||||
|
<span t-field="o.notas"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div t-if="o.tipo == 2" class="client section group">
|
||||||
|
<div class="habitacion col span_1_of_2">
|
||||||
|
<span t-field="o.habitacion"/>
|
||||||
|
</div>
|
||||||
|
<div class="tipo col span_1_of_2">CLIENTE</div>
|
||||||
|
<div class="datos col span_2_of_2">Del
|
||||||
|
<span t-field="o.checkin" t-field-options='{"format": "d MMMM"}'/>
|
||||||
|
al
|
||||||
|
<span t-field="o.checkout" t-field-options='{"format": "d MMMM"}'/></div>
|
||||||
|
<div class="notas col span_2_of_2" align="left">
|
||||||
|
<span t-field="o.notas"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div t-if="o.tipo == 3" class="revise section group">
|
||||||
|
<div class="habitacion col span_1_of_2">
|
||||||
|
<span t-field="o.habitacion"/>
|
||||||
|
</div>
|
||||||
|
<div class="tipo col span_1_of_2">REVISAR</div>
|
||||||
|
<div class="datos col span_2_of_2">Entrada
|
||||||
|
<span t-field="o.checkin" t-field-options='{"format": "d MMMM"}'/>
|
||||||
|
al
|
||||||
|
<span t-field="o.checkout" t-field-options='{"format": "d MMMM"}'/></div>
|
||||||
|
<div class="notas col span_2_of_2" align="left">
|
||||||
|
<span t-field="o.notas"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div t-if="o.tipo == 4" class="client section group">
|
||||||
|
<div class="habitacion col span_1_of_2">
|
||||||
|
<span t-field="o.habitacion"/>
|
||||||
|
</div>
|
||||||
|
<div class="tipo col span_1_of_2">STAFF</div>
|
||||||
|
<div class="datos col span_2_of_2">Del
|
||||||
|
<span t-field="o.checkin" t-field-options='{"format": "d MMMM"}'/>
|
||||||
|
al
|
||||||
|
<span t-field="o.checkout" t-field-options='{"format": "d MMMM"}'/></div>
|
||||||
|
<div class="notas col span_2_of_2" align="left">
|
||||||
|
<span t-field="o.notas"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
<div class="pie">Impreso el
|
||||||
|
<span t-esc="context_timestamp(datetime.datetime.now()).strftime('%d-%m-%Y a las %H:%M')"/>
|
||||||
|
Habitaciones:
|
||||||
|
<t t-esc="totalkelly"/></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template> -->
|
||||||
|
<!-- <record id="action_report_kellys" model="ir.actions.report.xml">
|
||||||
|
<field name="paperformat_id" ref="report_kellys_paperformat"/>
|
||||||
|
</record> -->
|
||||||
|
</data>
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user