[FIX] sale, sales analysis: fixed traceback when a line without product was present in the database.
bzr revid: qdp-launchpad@openerp.com-20130320115521-3h5gh66gul54zqxn
This commit is contained in:
commit
7502967a47
|
@ -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)
|
||||
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
|
||||
group by
|
||||
l.product_id,
|
||||
l.product_uom_qty,
|
||||
|
|
|
@ -68,8 +68,8 @@ 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)
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue