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

'ean13' not retrieved from product.product read method

By
E.M.
on 7/11/15, 8:07 AM 360 views

I modify the create method for product.product and I want to retrieve 'ean13' and 'name_template' fields right after product has been created.

I do this:

new_product = super(EanAuto, self).create(vals)  # This invokes create method of product.product

print new_product      # This outputs: product.product(44,) 

product_fields = new_product.read(['name_template','ean13'])

print product_fields    # This outputs: [{'ean13': False, 'id': 44, 'name_template': u'TestProduct1'}]


So name_template is being retrieved, but ean13 is not being retrieved (it is properly populated during the create and its value can be seen in the GUI),

any tips on what could be wrong here?

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: 7/11/15, 8:07 AM
Seen: 360 times
Last updated: 7/11/15, 8:07 AM