mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 16:31:58 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -5,12 +5,15 @@
|
|||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_preview_sale_order" position="before">
|
||||
<button name="action_view_attendee_list" type="object"
|
||||
class="oe_stat_button" icon="fa-users" attrs="{'invisible': [('attendee_count', '=', 0)]}">
|
||||
<div name="button_box" position="inside">
|
||||
<button name="action_view_attendee_list"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-users"
|
||||
invisible="attendee_count == 0">
|
||||
<field name="attendee_count" widget="statinfo" string="Attendees"/>
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
<xpath expr="//field[@name='order_line']//form//field[@name='product_id']" position="after">
|
||||
<field
|
||||
name="event_id"
|
||||
|
|
@ -19,25 +22,50 @@
|
|||
('date_end','>=',time.strftime('%Y-%m-%d 00:00:00')),
|
||||
'|', ('company_id', '=', False), ('company_id', '=', parent.company_id)
|
||||
]"
|
||||
attrs="{'invisible': [('product_type', '!=', 'event')], 'required': [('product_type', '=', 'event')]}"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
/>
|
||||
invisible="service_tracking != 'event'"
|
||||
required="service_tracking == 'event'"
|
||||
options="{'no_open': True, 'no_create': True}"/>
|
||||
<field
|
||||
name="event_slot_id"
|
||||
domain="[('event_id','=', event_id)]"
|
||||
invisible="not is_multi_slots or service_tracking != 'event'"
|
||||
required="is_multi_slots and service_tracking == 'event'"
|
||||
options="{'no_open': True, 'no_create': True}"/>
|
||||
<field
|
||||
name="event_ticket_id"
|
||||
domain="[
|
||||
('event_id', '=', event_id), ('product_id','=',product_id),
|
||||
'|', ('company_id', '=', False), ('company_id', '=', parent.company_id)
|
||||
]"
|
||||
attrs="{
|
||||
'invisible': ['|', ('product_type', '!=', 'event'), ('event_id', '=', False)],
|
||||
'required': [('product_type', '=', 'event'), ('event_id', '!=', False)],
|
||||
}"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
/>
|
||||
invisible="service_tracking != 'event' or not event_id"
|
||||
required="service_tracking == 'event' and event_id"
|
||||
options="{'no_open': True, 'no_create': True}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='order_line']//tree//field[@name='product_template_id']" position="after">
|
||||
<field name="event_id" optional="hide" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
||||
<field name="event_ticket_id" optional="hide" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
|
||||
<xpath expr="//field[@name='order_line']//list//field[@name='product_template_id']" position="after">
|
||||
<field name="event_id"
|
||||
column_invisible="True"
|
||||
domain="[
|
||||
('event_ticket_ids.product_id','=', product_id),
|
||||
('date_end','>=',time.strftime('%Y-%m-%d 00:00:00')),
|
||||
'|', ('company_id', '=', False), ('company_id', '=', parent.company_id)
|
||||
]"
|
||||
required="service_tracking == 'event'"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
placeholder="All Events"/>
|
||||
<field
|
||||
name="event_slot_id"
|
||||
column_invisible="True"
|
||||
domain="[('event_id','=', event_id)]"
|
||||
required="is_multi_slots and service_tracking == 'event'"
|
||||
options="{'no_open': True, 'no_create': True}"/>
|
||||
<field name="event_ticket_id"
|
||||
column_invisible="True"
|
||||
domain="[
|
||||
('event_id', '=', event_id), ('product_id','=',product_id),
|
||||
'|', ('company_id', '=', False), ('company_id', '=', parent.company_id)
|
||||
]"
|
||||
required="service_tracking == 'event' and event_id"
|
||||
options="{'no_open': True, 'no_create': True}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue