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.
I've created many2many field. I would like to apply domain filter on the many2many field. The field reference is not storing in the master table but it's creating another table and storing the reference ids. May I know how to apply the domain filter on the many2many field with an example.
An example to solve your issue :
in the model :
'functions_ids': fields.many2many('functions', 'function_partner_rel', 'partner_id', 'function_id', 'Functions'), 'function_id': fields.many2one('functions', 'Position Occupied'),
In the view:
<field name="function_id" readonly="False" domain="[('id', 'in', parent.functions_ids)]"/>
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: 8/23/13, 9:16 AM|
|Seen: 9831 times|
|Last updated: 3/16/15, 8:10 AM|