[FIX] Product : Pricelist types getting translated on Pricelist

lp bug: https://launchpad.net/bugs/439469 fixed

bzr revid: jvo@tinyerp.com-20091001113220-v5j8aaop9y560yen
This commit is contained in:
SME(OpenERP)
2009-10-01 17:02:20 +05:30
committed by Jay (Open ERP)
parent 53c2bb98ca
commit 777942a9ba
+12 -2
View File
@@ -81,8 +81,18 @@ product_pricelist_type()
class product_pricelist(osv.osv):
def _pricelist_type_get(self, cr, uid, context={}):
cr.execute('select key,name from product_pricelist_type order by name')
return cr.fetchall()
pricelist_type_obj = self.pool.get('product.pricelist.type')
pricelist_type_ids = pricelist_type_obj.search(cr, uid, [], order='name')
pricelist_types = pricelist_type_obj.read(cr, uid, pricelist_type_ids, ['key','name'], context=context)
res = []
for type in pricelist_types:
res.append((type['key'],type['name']))
return res
# cr.execute('select key,name from product_pricelist_type order by name')
# return cr.fetchall()
_name = "product.pricelist"
_description = "Pricelist"
_columns = {