Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
16166 มุมมอง

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
4837
1
ส.ค. 16
8177
2
พ.ค. 21
6636
1
ม.ค. 18
8550
0
มี.ค. 25
959