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 am working with the two objects
product.product. I am writing a script to (in realtime) create new
product.product entries for a certain
product.template, much like
product_variant_multi can do. However, I need some fields that are defined in
product.template to actually be defined in
supply_method in this case.
In addition, I need different suppliers per
product.product as well, which is currently implemented on
'seller_ids': fields.one2many('product.supplierinfo', 'product_id', 'Supplier'),, with
'product_id' : fields.many2one('product.template', 'Product', required=True, ondelete='cascade', select=True),.
So my questions seem to revolve around field inheritance and database design:
product.productand more or less copy the
supply_methoddefinition to it, and trust that the new database column will be used in preference to the one in
product.templatethroughout the system?
product.supplierinfoand overwrite the field
product_idto point to
product.template, and then
product.productagain to correct the
Thanks for the advice.
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: 4/9/13, 6:14 PM|
|Seen: 1805 times|
|Last updated: 3/16/15, 8:10 AM|