Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Hello everyone, I added two new fields (many2one, many2many) to the form but i can see that it has the different view. and I need to make the many2many field appear same as one2many(with no "add" button, and have the link "add an item").
You can use widget="one2many_list" in the xml. This will change many2many field form view or many2one field form view to one2many field view as you want.
Example 1: For many2many Field
<field name="fieldname_many2many" widget="one2many_list"/>
Example 2: For many2one Field
Declaration in .py:
'datas_field1':fields.many2one("ir.attachment", "DATAS Field")
Declaration in .xml:
<field name="datas_field1" readonly="1" widget="one2many_list"> <tree> <field name="datas_fname"/> <field name="datas"/> </tree> </field>
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/30/13, 10:47 PM|
|Seen: 13892 times|
|Last updated: 6/29/15, 1:20 AM|