From 5152982c58cc80a3146a8d3cc2f4716932592668 Mon Sep 17 00:00:00 2001 From: wilson gomez Date: Wed, 21 Jul 2021 08:52:06 -0500 Subject: [PATCH] minor fix sequence and view --- configuration.py | 14 ++++++++++---- hotel.xml | 5 ++--- view/cleaning_days_tree.xml | 2 +- view/guest_tree.xml | 2 +- view/housekeeping_task_tree.xml | 2 +- view/operation_line_tree.xml | 2 +- view/service_line_tree.xml | 2 +- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/configuration.py b/configuration.py index 7f93541..7c2d3e4 100644 --- a/configuration.py +++ b/configuration.py @@ -1,7 +1,7 @@ # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from trytond.model import ModelView, ModelSQL, fields -from trytond.pyson import Eval, If +from trytond.pyson import Eval, If, Id from trytond.transaction import Transaction from trytond.model.exceptions import AccessError from trytond.i18n import gettext @@ -14,19 +14,25 @@ class Configuration(ModelSQL, ModelView): 'Hotel Booking Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company', 0), None]), - ('code', '=', 'hotel'), + ('sequence_type', '=', + Id('hotel', + 'sequence_type_hotel')), ], required=True) hotel_service_sequence = fields.Many2One('ir.sequence', 'Hotel Service Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company', 0), None]), - ('code', '=', 'hotel'), + ('sequence_type', '=', + Id('hotel', + 'sequence_type_hotel')), ], required=True) registration_card_sequence = fields.Many2One('ir.sequence', 'Registration Card Sequence', domain=[ ('company', 'in', [Eval('context', {}).get('company', 0), None]), - ('code', '=', 'hotel'), + ('sequence_type', '=', + Id('hotel', + 'sequence_type_hotel')), ], required=True) default_charges = fields.Many2Many('hotel.configuration-product.product', 'configuration', 'product', 'Default Charges') diff --git a/hotel.xml b/hotel.xml index 3173b0b..8873697 100644 --- a/hotel.xml +++ b/hotel.xml @@ -47,7 +47,6 @@ this repository contains the full copyright notices and license terms. --> Hotel - hotel @@ -62,12 +61,12 @@ this repository contains the full copyright notices and license terms. --> Booking - hotel + Occupancy - hotel + diff --git a/view/cleaning_days_tree.xml b/view/cleaning_days_tree.xml index 9a5b49b..2ebf1ed 100644 --- a/view/cleaning_days_tree.xml +++ b/view/cleaning_days_tree.xml @@ -1,7 +1,7 @@ - + diff --git a/view/guest_tree.xml b/view/guest_tree.xml index 9c0b03c..a55fc90 100644 --- a/view/guest_tree.xml +++ b/view/guest_tree.xml @@ -1,7 +1,7 @@ - + diff --git a/view/housekeeping_task_tree.xml b/view/housekeeping_task_tree.xml index 0fafdd5..063997d 100644 --- a/view/housekeeping_task_tree.xml +++ b/view/housekeeping_task_tree.xml @@ -1,7 +1,7 @@ - + diff --git a/view/operation_line_tree.xml b/view/operation_line_tree.xml index cf41278..c7282c3 100644 --- a/view/operation_line_tree.xml +++ b/view/operation_line_tree.xml @@ -1,7 +1,7 @@ - + diff --git a/view/service_line_tree.xml b/view/service_line_tree.xml index 84e319f..963eb16 100644 --- a/view/service_line_tree.xml +++ b/view/service_line_tree.xml @@ -1,7 +1,7 @@ - +