FIX : Account Invoice Report, append active and limit 1 with subquery

bzr revid: tta@openerp.com-20110407115220-f1qp273vl3gpa6ke
This commit is contained in:
Tejas (OpenERP) 2011-04-07 17:22:20 +05:30
parent ce937912ce
commit 787f38b5c5
1 changed files with 2 additions and 2 deletions

View File

@ -88,8 +88,8 @@ class account_invoice_report(osv.osv):
ai.partner_id as partner_id,
ai.payment_term as payment_term,
ai.period_id as period_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)
(case when (u.uom_type not in ('reference')) then
(select name from product_uom where uom_type='reference' and product_uom.active and category_id=u.category_id limit 1 )
else
u.name
end) as uom_name,