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)]"/>
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 8/23/13, 9:16 AM|
|Seen: 9029 times|
|Last updated: 3/16/15, 8:10 AM|