Odoo Help

Welcome!

This community 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.

0

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

By
E.M.
on 2/20/16, 4:58 AM 558 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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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