Odoo Help


Inheritance & Transient Models: how can I create a transient instance of a given record from its inherited class?

on 2/20/16, 4:58 AM 1,756 views

Given this new model:

class ProductProductPrintWizard(models.TransientModel):
_inherit = "product.product"

_name = "product.product.printwizard"

print_check = fields.Boolean(string="Print", default=True)

print_number_of_labels = fields.Integer(string="Number of Labels", default=1)

And that I have a product.product id, how can I create a new instance of model product.product.printwizard which inherits all values from that product.product id record and get its new id?

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

1 follower(s)


Asked: 2/20/16, 4:58 AM
Seen: 1756 times
Last updated: 2/20/16, 4:59 AM