[FIX]sale_report: fix problem when viewing reporting/sale_analysis and no order_lines where defined in a SO
lp bug: https://launchpad.net/bugs/938866 fixed bzr revid: csn@openerp.com-20130320101316-vvv1mwkdio2pi6oi
This commit is contained in:
@@ -88,12 +88,11 @@ class sale_report(osv.osv):
|
||||
s.project_id as analytic_account_id
|
||||
from
|
||||
sale_order s
|
||||
left join sale_order_line l on (s.id=l.order_id)
|
||||
left join product_product p on (l.product_id=p.id)
|
||||
left join product_template t on (p.product_tmpl_id=t.id)
|
||||
left join product_uom u on (u.id=l.product_uom)
|
||||
left join product_uom u2 on (u2.id=t.uom_id)
|
||||
where l.product_id is not null
|
||||
join sale_order_line l on (s.id=l.order_id)
|
||||
join product_product p on (l.product_id=p.id)
|
||||
join product_template t on (p.product_tmpl_id=t.id)
|
||||
join product_uom u on (u.id=l.product_uom)
|
||||
join product_uom u2 on (u2.id=t.uom_id)
|
||||
group by
|
||||
l.product_id,
|
||||
l.product_uom_qty,
|
||||
|
||||
@@ -68,11 +68,11 @@ class sale_report(osv.osv):
|
||||
s.project_id as analytic_account_id
|
||||
from
|
||||
sale_order s
|
||||
left join sale_order_line l on (s.id=l.order_id)
|
||||
left join product_product p on (l.product_id=p.id)
|
||||
left join product_template t on (p.product_tmpl_id=t.id)
|
||||
left join product_uom u on (u.id=l.product_uom)
|
||||
left join product_uom u2 on (u2.id=t.uom_id)
|
||||
join sale_order_line l on (s.id=l.order_id)
|
||||
join product_product p on (l.product_id=p.id)
|
||||
join product_template t on (p.product_tmpl_id=t.id)
|
||||
join product_uom u on (u.id=l.product_uom)
|
||||
join product_uom u2 on (u2.id=t.uom_id)
|
||||
group by
|
||||
l.product_id,
|
||||
l.product_uom_qty,
|
||||
|
||||
Reference in New Issue
Block a user