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.
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/9/13, 6:14 PM|
|Seen: 1289 times|
|Last updated: 3/16/15, 8:10 AM|