Minor fix report

This commit is contained in:
oscar alvarez 2022-11-19 11:40:54 -05:00
parent ce13b246f8
commit 927e9de648
4 changed files with 17 additions and 14 deletions

View File

@ -1651,15 +1651,15 @@ class BookingStatusReport(Report):
) )
records = Folio.search(dom, order=[('arrival_date', 'ASC')]) records = Folio.search(dom, order=[('arrival_date', 'ASC')])
bookings = {} _records = {}
if data['grouped']: for fol in records:
for fol in records: bk = fol.booking
bk = fol.booking if bk not in _records.keys():
if bk not in bookings.keys(): _records[bk] = []
bookings[bk] = [] _records[bk].append(fol)
bookings[bk].append(fol)
records = bookings report_context['grouped'] = data['grouped']
report_context['records'] = records report_context['records'] = _records
report_context['company'] = Company(data['company']) report_context['company'] = Company(data['company'])
return report_context return report_context

Binary file not shown.

View File

@ -56,6 +56,7 @@ class Service(Workflow, ModelSQL, ModelView):
('checked', 'Checked'), ('checked', 'Checked'),
], 'State', readonly=True, states=STATES) ], 'State', readonly=True, states=STATES)
state_string = state.translated('state') state_string = state.translated('state')
space = fields.Many2One('analytic_account.space', 'Space', required=False)
description = fields.Char('Description', select=True, states=STATES) description = fields.Char('Description', select=True, states=STATES)
count_services = fields.Function(fields.Integer('Count Services', count_services = fields.Function(fields.Integer('Count Services',
select=True), 'get_count_services') select=True), 'get_count_services')

View File

@ -1,19 +1,21 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of <!-- This file is part of Tryton. 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. -->
<form> <form col="6">
<label name="kind"/> <label name="kind"/>
<field name="kind" widget="selection"/> <field name="kind" widget="selection"/>
<label name="company"/>
<field name="company"/>
<label name="number"/> <label name="number"/>
<field name="number"/> <field name="number"/>
<label name="service_date"/> <label name="service_date"/>
<field name="service_date"/> <field name="service_date"/>
<label name="company"/> <label name="space"/>
<field name="company"/> <field name="space" widget="selection"/>
<label name="description"/> <label name="description"/>
<field name="description"/> <field name="description"/>
<button name="open" string="Open" icon="tryton-forward" colspan="2"/> <!-- <button name="open" string="Open" icon="tryton-forward" colspan="2"/> -->
<field name="lines" colspan="4" <field name="lines" colspan="6"
view_ids="hotel.service_line_view_tree"/> view_ids="hotel.service_line_view_tree"/>
<group col="5" colspan="4" id="buttons"> <group col="5" colspan="4" id="buttons">