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

how can i add a checkbox or a button to an embedded treeview and fire cutyom python logic?.

tried the following:

<field name="invoice_ids">
<tree create="false" delete="false" default_order="write_date desc">
....
<field name="origin" readonly="True" />
<button name="test_button" string="Test" class="oe_highlight"/>
</tree>
</field>

It adds a button but it does not call any object method.



อวตาร
ละทิ้ง

There is step by step guide about odoo customization: https://goo.gl/8HgnCF

คำตอบที่ดีที่สุด

Add type="object" and I will call method specifed as name attribute. in this case "test_button"
<button name="test_button" type="object" string="Test" class="oe_highlight"/>

อวตาร
ละทิ้ง