Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
16221 Представления

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
4870
1
авг. 16
8189
2
мая 21
6691
1
янв. 18
8589
0
мар. 25
991