When I add a many2many product Field - for example in the res.partner view - like
and I add a product to this "product_list" field, how can I tell the product that it has been added to this form?
You can easily add a bidirectional many2many relation by adding a many2many field to your product.product model:
'supplier_list': fields.many2many('res.partner', 'product_product_lieferantenprodukt','lieferantenprodukt_id', 'product_id', 'Lieferanten'),
The product will automatically 'know' that it has been added, since it is stored in a special table 'product_product_lieferantenprodukt' in your database.
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: 4/23/14, 1:26 AM|
|Seen: 548 times|
|Last updated: 3/16/15, 8:10 AM|