[IMP] lunch: better alert view

Reorganize the fields to clarify the view
This commit is contained in:
Martin Trigaux
2018-08-10 15:32:04 +02:00
parent 8f22f23e61
commit 08dbb39171
+43 -40
View File
@@ -660,49 +660,52 @@
<field name="model">lunch.alert</field>
<field name="arch" type="xml">
<form>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/>
</button>
</div>
<group>
<group string="Schedule Date">
<field name="alert_type"/>
<field name="specific_day" attrs="{'invisible': [('alert_type','!=','specific')], 'required':[('alert_type','=','specific')]}"/>
</group>
<group string="Schedule Hour">
<field name='start_hour' widget='float_time'/>
<field name='end_hour' widget='float_time'/>
</group>
<group attrs="{'invisible': [('alert_type','!=','week')]}">
<group col="4">
<field name="monday"/>
<field name="tuesday"/>
<field name="wednesday"/>
<field name="thursday"/>
<field name="friday"/>
<field name="saturday"/>
<field name="sunday"/>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/>
</button>
</div>
<group>
<group string="Schedule">
<group colspan="4">
<field name="alert_type"/>
<field name="specific_day"
attrs="{'invisible': [('alert_type','!=','specific')], 'required':[('alert_type','=','specific')]}"/>
<field name='start_hour' widget='float_time' />
<field name='end_hour' widget='float_time' />
</group>
<group col="4" attrs="{'invisible': [('alert_type','!=','week')]}">
<field name="monday"/>
<field name="tuesday"/>
<field name="wednesday"/>
<field name="thursday"/>
<field name="friday"/>
<field name="saturday"/>
<field name="sunday"/>
</group>
</group>
<group string="Vendor">
<group colspan="4">
<field name="partner_id"/>
<field name="display" invisible="True"/>
</group>
<div class="oe_grey" colspan="4"
attrs="{'invisible': ['|', ('partner_id', '=', False), ('display', '=', True)]}">
Products from this vendor can <strong>not</strong> be order at the moment.
</div>
<div class="oe_grey" colspan="4"
attrs="{'invisible': ['|', ('partner_id', '=', False), ('display', '=', False)]}">
Products from this vendor can be order at the moment.
</div>
</group>
</group>
</group>
<group>
<group>
<field name="partner_id"/>
<field name="display" invisible="True"/>
<group string='Message'>
<field name='message' nolabel='1' placeholder="Write the message you want to display during the defined period..."/>
</group>
<div class="oe_grey" attrs="{'invisible': ['|', ('partner_id', '=', False), ('display', '=', True)]}">
Products from this vendor can not be order at the moment.
</div>
<div class="oe_grey" attrs="{'invisible': ['|', ('partner_id', '=', False), ('display', '=', False)]}">
Products from this vendor can be order at the moment.
</div>
</group>
<group string='Message'>
<field name='message' nolabel='1' placeholder="Write the message you want to display during the defined period..."/>
</group>
</sheet>
</form>
</field>
</record>