From 645d0a870d32bec67b1fc3d40d6ece0d52df0d52 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Fri, 1 Jul 2011 17:26:28 +0530 Subject: [PATCH] [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 --- addons/purchase/report/purchase_report.py | 2 +- addons/sale/report/sale_report.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py index 6b68cecf1a5..c91920a0d86 100644 --- a/addons/purchase/report/purchase_report.py +++ b/addons/purchase/report/purchase_report.py @@ -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, diff --git a/addons/sale/report/sale_report.py b/addons/sale/report/sale_report.py index aaaec228d7b..ed457835fb6 100644 --- a/addons/sale/report/sale_report.py +++ b/addons/sale/report/sale_report.py @@ -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,