تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
16154 أدوات العرض

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>

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 18
4836
1
أغسطس 16
8177
2
مايو 21
6632
1
يناير 18
8542
0
مارس 25
950