Reputation: 177
i want to position my button beside the inherited button this is my code xml but isnt work i get button under to other
<record id="holidays_views_form" model="ir.ui.view">
<field name="name">hr.holidays.form</field>
<field name="type">form</field>
<field name="model">hr.holidays</field>
<field name="inherit_id" ref="hr_holidays.edit_holiday_new"/>
<field name="arch" type="xml">
<data>
<header>
<xpath expr="//button[@name='refuse']" position="beside">
<button string="Retour" name="trainee_canceled_action" states="validate,validate1" type="object" groups="" />
</xpath>
</header>
Upvotes: 0
Views: 1568
Reputation: 6295
Position attribute in Odoo has five options : after
, before
, replace
, inside
and attributes
:
You can try below code:
<record id="holidays_views_form" model="ir.ui.view">
<field name="name">hr.holidays.form</field>
<field name="type">form</field>
<field name="model">hr.holidays</field>
<field name="inherit_id" ref="hr_holidays.edit_holiday_new"/>
<field name="arch" type="xml">
<data>
<header>
<xpath expr="//button[@name='refuse']" position="after">
<button string="Retour" name="trainee_canceled_action" states="validate,validate1" type="object" groups="" />
</xpath>
</header>
Bests
Upvotes: 2