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 678 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?

Your Answer

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

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: 678 times
Last updated: 2/20/16, 4:59 AM