Odoo Help


Product vs Template [SOLVED]

Dr Obx
on 12/24/15, 7:22 AM 1,116 views

Guys, what is the difference between

product_id = fields.Many2one('product.template')


product_id = fields.Many2one('product.product')

If I'm using to read data 'product.template' getting different information than if I'm reading from database using 'product.product'

With 'product.product' everything seems to be OK/correct, when I'm using 'product.template' everything is completely wrong.

It shouldn't be the same ?

Just asking :)


Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
| 5 3 7
Gîza, Egypt
--Tarek Mohamed Ibrahim--

I am an old VFP developer on ERP

I have moved to 2p since Nov-2014 and started developing with Python on Odoo.



Tarek Mohamed Ibrahim
On 12/24/15, 7:34 AM

product_template class is the base class for product_product. Same as 'resource_resource' is a base class and hr_employee inherited from it. So dealing with product_product will not be the same as product_template. 

Krupesh Laiya
On 12/24/15, 7:28 AM

No it is not same because product template is one product and product.product is variants of that perticular product template let understand with one example suppose you are selling POLO T-shirt polo t-shirt are in different color so you can define that different color in product.product.

Whatever, the most important thing is I have to read data using product.product instead of product template :) I was using product.template first and everything was wrong, all information I read from database was incorrect, weird names (completely different, mixed up), quants ok but system was applying wrong names to the ID's :) Anyway, thank you, now I know what to do ;)

Dr Obx
on 12/29/15, 4:23 AM

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: 12/24/15, 7:22 AM
Seen: 1116 times
Last updated: 12/25/15, 5:35 PM