2018-01-16 06:58:15 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2018-01-16 11:34:37 +01:00
|
|
|
<flectra>
|
2018-01-16 06:58:15 +01:00
|
|
|
<record id="view_sale_order_form_inherit_event" model="ir.ui.view">
|
|
|
|
<field name="name">sale.order.form.inherit</field>
|
|
|
|
<field name="model">sale.order</field>
|
|
|
|
<field name="inherit_id" ref="sale.view_order_form" />
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<xpath expr="//field[@name='order_line']//form//field[@name='product_id']" position="after">
|
|
|
|
<field name="event_id" domain="[('event_ticket_ids.product_id','=', product_id),('date_end','>=',time.strftime('%Y-%m-%d 00:00:00'))]" attrs="{'invisible': [('event_ok', '=', False)],'required': [('event_ok', '!=', False)]}"/>
|
|
|
|
<field name="event_ticket_id" domain="[('event_id', '=', event_id), ('product_id','=',product_id), '|', ('seats_availability', '=', 'unlimited'), ('seats_available', '>', 0)]" attrs="{'invisible': [('event_ok', '=', False)], 'required': [('event_ok', '!=', False)]}"/>
|
|
|
|
<field name="event_ok" invisible="1"/>
|
|
|
|
</xpath>
|
|
|
|
<xpath expr="//field[@name='order_line']//tree//field[@name='product_id']" position="after">
|
|
|
|
<field name="event_ok" invisible="1"/>
|
|
|
|
</xpath>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- the presence of 'event user' makes the order lines non-editable -->
|
|
|
|
<record id="sale.view_order_form_editable_list" model="ir.ui.view">
|
|
|
|
<field name="groups_id" eval="[(4, ref('event.group_event_user'))]"/>
|
|
|
|
</record>
|
2018-01-16 11:34:37 +01:00
|
|
|
</flectra>
|