minor fix sequence and view

This commit is contained in:
wilson gomez 2021-07-21 08:52:06 -05:00
parent 59d4db316d
commit 5152982c58
7 changed files with 17 additions and 12 deletions

View file

@ -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')

View file

@ -47,7 +47,6 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.sequence.type" id="sequence_type_hotel">
<field name="name">Hotel</field>
<field name="code">hotel</field>
</record>
<record model="ir.sequence.type-res.group"
id="sequence_type_hotel_group_admin">
@ -62,12 +61,12 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.sequence" id="sequence_hotel_booking">
<field name="name">Booking</field>
<field name="code">hotel</field>
<field name="sequence_type" ref="sequence_type_hotel"/>
</record>
<record model="ir.sequence" id="sequence_hotel_occupancy">
<field name="name">Occupancy</field>
<field name="code">hotel</field>
<field name="sequence_type" ref="sequence_type_hotel"/>
</record>
</data>

View file

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree editable="bottom">
<tree editable="1">
<field name="weekday"/>
<field name="note"/>
</tree>

View file

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree editable="top">
<tree editable="1">
<field name="party"/>
<field name="type_document"/>
<field name="name"/>

View file

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree editable="top">
<tree editable="1">
<field name="task"/>
<field name="frecuency"/>
<field name="quantity"/>

View file

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree editable="top">
<tree editable="1">
<field name="date_service"/>
<field name="product"/>
<field name="description"/>

View file

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree editable="bottom">
<tree editable="1">
<field name="room" widget="selection"/>
<!-- <field name="guest" widget="selection"/> -->
<field name="time_service"/>