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

I can't see updated ean13 in product_template why ?

By
Dr Obx
on 5/17/16, 3:54 PM 362 views

Guys, importing data from csv, can create products, updating field ean13 (product_product)

and i can see it in product_product but I can't see it in product_template.

Did I missed something ?


0

Prakash Sharma

--Prakash Sharma--
815
| 2 1 4
Delhi, India
--Prakash Sharma--

I like to surround myself with brave, creative people.

My motivation for learning different technologies and algos drive me. I love challenges of a steep learning curve which I believe makes me a better learner. I have a strong desire to learn different technologies, which would enable me to become a full stack developer.

Prakash Sharma
On 5/18/16, 6:25 AM
self.env['product.product'].write({'ean13':self.ean13_barcode})

this is not the correct syntax of write in odoo , you need to browse the object first .

use

product_obj = self.env['product.product'].browse(product_id)
product_obj.ean13=self.ean13_barcode####this will update ean13



YES i just realized, where it suppose to write it if there is no either id or any other significant information where to write ean13 :) Yes Prakash, thank you.

Dr Obx
on 5/18/16, 8:18 AM

Silly me ;)

Dr Obx
on 5/18/16, 8:18 AM

I was thinking if I'm in object there will be automatically id for the product i created - of course NOT! i was just wrong! :) No worries, now is all clear and i know what to do :) However I already solved this problem using simple/direct SQL query but I want it to be done using Odoo API :)

Dr Obx
on 5/18/16, 8:21 AM

Aaa hahaha, thank you Prakash, It was just my stu......y. I just added extra field ean13 in my module so the original ean13 was actually overwritten that's why I couldn't see it :) Now is OK!

Dr Obx
on 5/23/16, 4:39 PM

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: 5/17/16, 3:54 PM
Seen: 362 times
Last updated: 5/18/16, 6:20 PM