[FIX] product: Product field

"product.product" model inherits from "product.template"  model then
all the float fields in "product.product" include those from "product.template".
A list is used to conserve the order of the fields.

Fixes #2067
opw:639766
This commit is contained in:
Goffin Simon 2015-05-28 15:48:43 +02:00
parent 1bc328317a
commit 7f8cd01431
1 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,8 @@ class price_type(osv.osv):
ids = mf.search(cr, uid, [('model','in', (('product.product'),('product.template'))), ('ttype','=','float')], context=context)
res = []
for field in mf.browse(cr, uid, ids, context=context):
res.append((field.name, field.field_description))
if not (field.name, field.field_description) in res:
res.append((field.name, field.field_description))
return res
def _get_field_currency(self, cr, uid, fname, ctx):