[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:
Adil Houmadi
2015-04-23 13:23:40 +02:00
committed by Denis Ledoux
parent 30e54e4965
commit f2ef46e9f4
+3 -2
View File
@@ -75,7 +75,7 @@ class purchase_report(osv.osv):
s.dest_address_id,
s.pricelist_id,
s.validator,
s.picking_type_id as picking_type_id,
spt.warehouse_id as picking_type_id,
s.partner_id as partner_id,
s.create_uid as user_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 product_uom u on (u.id=l.product_uom)
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
s.company_id,
s.create_uid,
@@ -116,7 +117,7 @@ class purchase_report(osv.osv):
t.categ_id,
s.date_order,
s.state,
s.picking_type_id,
spt.warehouse_id,
u.uom_type,
u.category_id,
t.uom_id,