Server ORM bug V5. Error in read function with inherited field. Maybe V6 is also impacted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP's Framework R&D | ||
5.0 |
Won't Fix
|
Low
|
Anup(SerpentCS) |
Bug Description
We are working on product_
If you add the field "name" to the object product.product, the "read" function on the object product.product will give you the result of the field "name" of the object product.template.
If you look at orm.py, line 2333 :
You will see that the ORM doesn't make any check on the existing fields in product.product before reading them in product.template.
I just added a check
- cols = intersect(
+ cols = [x for x in intersect(
For information : "cols" is the variable which contains the fields that we have to read in the inherited object.
With this patch fields are only read in the inherited object if they are not found in the actual object.
Changed in openobject-server: | |
status: | Incomplete → New |
Hello Sébastien,
I disagree with you here. Why would you need to add 'name' column to product_product table?
Product already _inherits Templates and it has 'name' already.
Adding the same field on product will be ambiguous I guess.
Correct me if I am wrong.
Thanks.