[FIX] product: purchase report, correct warehouse
Fix stock warehouse column on purchase report, we need to join stock_picking_type and stock_warehouse in order to have the warehouse itself Closes #6409
This commit is contained in:
parent
30e54e4965
commit
f2ef46e9f4
|
@ -75,7 +75,7 @@ class purchase_report(osv.osv):
|
||||||
s.dest_address_id,
|
s.dest_address_id,
|
||||||
s.pricelist_id,
|
s.pricelist_id,
|
||||||
s.validator,
|
s.validator,
|
||||||
s.picking_type_id as picking_type_id,
|
spt.warehouse_id as picking_type_id,
|
||||||
s.partner_id as partner_id,
|
s.partner_id as partner_id,
|
||||||
s.create_uid as user_id,
|
s.create_uid as user_id,
|
||||||
s.company_id as company_id,
|
s.company_id as company_id,
|
||||||
|
@ -98,6 +98,7 @@ class purchase_report(osv.osv):
|
||||||
LEFT JOIN ir_property ip ON (ip.name='standard_price' AND ip.res_id=CONCAT('product.template,',t.id) AND ip.company_id=s.company_id)
|
LEFT JOIN ir_property ip ON (ip.name='standard_price' AND ip.res_id=CONCAT('product.template,',t.id) AND ip.company_id=s.company_id)
|
||||||
left join product_uom u on (u.id=l.product_uom)
|
left join product_uom u on (u.id=l.product_uom)
|
||||||
left join product_uom u2 on (u2.id=t.uom_id)
|
left join product_uom u2 on (u2.id=t.uom_id)
|
||||||
|
left join stock_picking_type spt on (spt.id=s.picking_type_id)
|
||||||
group by
|
group by
|
||||||
s.company_id,
|
s.company_id,
|
||||||
s.create_uid,
|
s.create_uid,
|
||||||
|
@ -116,7 +117,7 @@ class purchase_report(osv.osv):
|
||||||
t.categ_id,
|
t.categ_id,
|
||||||
s.date_order,
|
s.date_order,
|
||||||
s.state,
|
s.state,
|
||||||
s.picking_type_id,
|
spt.warehouse_id,
|
||||||
u.uom_type,
|
u.uom_type,
|
||||||
u.category_id,
|
u.category_id,
|
||||||
t.uom_id,
|
t.uom_id,
|
||||||
|
|
Loading…
Reference in New Issue