Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
16172 Переглядів

Usually we add custom smart buttons by adding a position like

<xpath expr="//button[@name='%(crm.crm_lead_opportunities)d']" position="before">

Since account.invoice model does not have a smart button by default, how can I specify position of the new button

Аватар
Відмінити
Найкраща відповідь


<record id="record_ida" model="ir.ui.view">
<field name="name">account</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@class='oe_button_box']" position="inside">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
<!-- <field name="active" widget="boolean_button"-->
<!-- options='{"terminology": "archive"}'/>-->
</button>
</xpath>
</field>
</record>


Аватар
Відмінити
Автор

It worked, Thank you for helping out a beginner.

Найкраща відповідь

Hello

<div name="button_box" position="inside">
    <button name="your_button" type="object" class="oe_stat_button" >
    </button>
</div>

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
вер. 18
4840
1
серп. 16
8182
2
трав. 21
6644
1
січ. 18
8558
0
бер. 25
965