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

I want to add a button that, when clicked, adds input fields. How will I do?

อวตาร
ละทิ้ง
ผู้เขียน

Hello Daniel Can you give me an example. I'm new in OpenERP. How can I link the button to the condition.

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

HI, you can follow following tutorial for this:

https://youtu.be/kwkddYoFQCE

Hope it helps,

Thanks

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Checkout the app functionality on clicking the button it is able to add fields in form view.

https://apps.odoo.com/apps/modules/16.0/dynamic_product_fields/

Regards

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

One solution is to have those fields in the form, with the attribute attrs="{'invisible: <condition>}". The button would change a value in the document, and based on that value the <condition> could evaluate to False to make the corresponding fields visible.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Or try this: http://stackoverflow.com/questions/17738566/how-to-create-dynamic-fields-in-openerp-7-module

อวตาร
ละทิ้ง