[FIX] purchase,sale : one category can have several UoM references than it will not give error msg when open related Report

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

bzr revid: aag@tinyerp.co.in-20110701115628-500ttalfgqlhifnx
This commit is contained in:
aag (OpenERP)
2011-07-01 17:26:28 +05:30
parent 4b6c69f421
commit 645d0a870d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ class purchase_report(osv.osv):
l.product_id,
t.categ_id as category_id,
(case when u.uom_type not in ('reference') then
(select id from product_uom where uom_type='reference' and category_id = 1)
(select id from product_uom where uom_type='reference' and category_id = 1 LIMIT 1)
else
u.id
end) as product_uom,
+1 -1
View File
@@ -91,7 +91,7 @@ class sale_report(osv.osv):
select l.id as id,
l.product_id as product_id,
(case when u.uom_type not in ('reference') then
(select name from product_uom where uom_type='reference' and category_id=u.category_id)
(select name from product_uom where uom_type='reference' and category_id=u.category_id LIMIT 1)
else
u.name
end) as uom_name,