[IMP] event_*: re-arrange stat buttons on the event form view
This commit improves the view inheritance priority and xpaths for the inherited form views of event to arrange the stat buttons in logical manner, regardless of installation order of the modules. The stat button order should always be: - Attendees - Leads - Sales - Tracks - Sponsors - Rooms Task-2585998 EnterprisePR-https://github.com/odoo/enterprise/pull/20082 closes odoo/odoo#74203 Related: odoo/enterprise#20082 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<field name="name">event.event.form.inherit.event.crm</field>
|
||||
<field name="model">event.event</field>
|
||||
<field name="inherit_id" ref="event.view_event_form"/>
|
||||
<field name="priority" eval="30"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='%(event.act_event_registration_from_event)d']" position="after">
|
||||
<button name="%(crm_lead_action_from_event)d" class="oe_stat_button" type="action" icon="fa-star"
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
<field name="name">event.form.inherit</field>
|
||||
<field name="model">event.event</field>
|
||||
<field name="inherit_id" ref="event.view_event_form"/>
|
||||
<field name="priority" eval="20"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
|
||||
<xpath expr="//button[@name='%(event.act_event_registration_from_event)d']" position="after">
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<button name="action_view_linked_orders"
|
||||
type="object" class="oe_stat_button" icon="fa-dollar"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<field name="name">event.event.view.form.inherit.meet</field>
|
||||
<field name="model">event.event</field>
|
||||
<field name="inherit_id" ref="website_event.event_event_view_form"/>
|
||||
<field name="priority" eval="10"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='is_published']" position="before">
|
||||
<button class="oe_stat_button" context="{'default_event_id': active_id, 'search_default_event_id': active_id}" icon="fa-comments-o" name="%(event_meeting_room_action)d" type="action">
|
||||
|
||||
Reference in New Issue
Block a user