Odoo Help


Work with stored values - tell product "you were added"

on 4/23/14, 1:26 AM 834 views

When I add a many2many product Field - for example in the res.partner view - like

'product_list': fields.many2many('product.product','product_product_lieferantenprodukt','product_id','lieferantenprodukt_id','lieferantenprodukt'),

and I add a product to this "product_list" field, how can I tell the product that it has been added to this form?


René Schuster

--René Schuster--
| 5 5 8
Weinheim, Germany
--René Schuster--

Challenge Everything!

René Schuster
On 5/15/14, 8:42 AM

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.

See also: https://doc.openerp.com/6.0/developer/2_5_Objects_Fields_Methods/field_type/#relational-types


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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 4/23/14, 1:26 AM
Seen: 834 times
Last updated: 3/16/15, 8:10 AM