mirror of
https://bitbucket.org/presik/trytonpsk-hotel.git
synced 2023-12-14 07:52:52 +01:00
Add children policy
This commit is contained in:
parent
63c17e1d53
commit
ff6909b16d
|
@ -37,6 +37,7 @@ def register():
|
|||
company.Company,
|
||||
configuration.ConfigurationProduct,
|
||||
configuration.Configuration,
|
||||
configuration.ChildrenPolicy,
|
||||
product.Template,
|
||||
product.PriceList,
|
||||
operation.Maintenance,
|
||||
|
|
|
@ -67,6 +67,8 @@ class Configuration(ModelSQL, ModelView):
|
|||
domain=[('type', '=', 'storage')], required=False)
|
||||
payment_term = fields.Many2One('account.invoice.payment_term',
|
||||
'Payment Term')
|
||||
children_policies = fields.One2Many('hotel.children_policy',
|
||||
'configuration', 'Children Policies')
|
||||
|
||||
@staticmethod
|
||||
def default_company():
|
||||
|
@ -92,3 +94,12 @@ class ConfigurationProduct(ModelSQL):
|
|||
ondelete='CASCADE', select=True, required=True)
|
||||
product = fields.Many2One('product.product', 'Product',
|
||||
ondelete='RESTRICT', select=True, required=True)
|
||||
|
||||
|
||||
class ChildrenPolicy(ModelSQL, ModelView):
|
||||
'Children Policy'
|
||||
__name__ = 'hotel.children_policy'
|
||||
configuration = fields.Many2One('hotel.configuration', 'Configuration',
|
||||
ondelete='CASCADE', select=True, required=True)
|
||||
limit_age = fields.Integer('Limit Age', help='In years')
|
||||
amount = fields.Numeric('Amount')
|
||||
|
|
|
@ -30,10 +30,20 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="view" ref="hotel_configuration_view_form"/>
|
||||
<field name="act_window" ref="act_hotel_configuration_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Configuration" parent="menu_configuration"
|
||||
action="act_hotel_configuration_form" sequence="20"
|
||||
id="menu_hotel_configuration" icon="tryton-list"/>
|
||||
|
||||
<record model="ir.ui.view" id="hotel_children_policy_view_form">
|
||||
<field name="model">hotel.children_policy</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">children_policy_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="hotel_children_policy_view_tree">
|
||||
<field name="model">hotel.children_policy</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">children_policy_tree</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<!-- 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>
|
||||
<field name="name"/>
|
||||
<field name="notes"/>
|
||||
<field name="type"/>
|
||||
<field name="cleaning_days"/>
|
||||
<field name="name" expand="1"/>
|
||||
<field name="notes" expand="1"/>
|
||||
<field name="type" expand="1"/>
|
||||
<field name="cleaning_days" expand="1"/>
|
||||
</tree>
|
||||
|
|
9
view/children_policy_form.xml
Normal file
9
view/children_policy_form.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?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. -->
|
||||
<form>
|
||||
<label name="limit_age"/>
|
||||
<field name="limit_age"/>
|
||||
<label name="amount"/>
|
||||
<field name="amount"/>
|
||||
</form>
|
7
view/children_policy_tree.xml
Normal file
7
view/children_policy_tree.xml
Normal file
|
@ -0,0 +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>
|
||||
<field name="limit_age" expand="1"/>
|
||||
<field name="amount" expand="1"/>
|
||||
</tree>
|
|
@ -24,13 +24,13 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="storage_by_default"/>
|
||||
<label name="payment_term"/>
|
||||
<field name="payment_term"/>
|
||||
<label name="age_children_policy"/>
|
||||
<field name="age_children_policy"/>
|
||||
<label name="booking_email"/>
|
||||
<field name="booking_email"/>
|
||||
<label name="check_in_email"/>
|
||||
<field name="check_in_email"/>
|
||||
<label name="customer_experience_email"/>
|
||||
<field name="customer_experience_email"/>
|
||||
<field name="default_charges" colspan="4"/>
|
||||
<newline />
|
||||
<field name="default_charges" colspan="2"/>
|
||||
<field name="children_policies" colspan="2"/>
|
||||
</form>
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
<!-- 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>
|
||||
<field name="company"/>
|
||||
<field name="check_in_time"/>
|
||||
<field name="check_out_time"/>
|
||||
<field name="company" expand="1"/>
|
||||
</tree>
|
||||
|
|
|
@ -2,7 +2,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. -->
|
||||
<tree editable="1">
|
||||
<field name="task"/>
|
||||
<field name="frecuency"/>
|
||||
<field name="quantity"/>
|
||||
<field name="task" expand="1"/>
|
||||
<field name="frecuency" expand="1"/>
|
||||
<field name="quantity" expand="1"/>
|
||||
</tree>
|
||||
|
|
Loading…
Reference in a new issue