[MERG€] purchase: stock move created by a PO hadn't any reference to the PO as origin

lp bug: https://launchpad.net/bugs/1269353 fixed

bzr revid: qdp-launchpad@openerp.com-20140130103722-q919n0j0otu0jczs
This commit is contained in:
Quentin (OpenERP) 2014-01-30 11:37:22 +01:00
commit 72f4cdc3b1
1 changed files with 1 additions and 0 deletions

View File

@ -694,6 +694,7 @@ class purchase_order(osv.osv):
'picking_type_id': order.picking_type_id.id,
'group_id': group_id,
'procurement_id': order_line.procurement_ids and order_line.procurement_ids[0].id or False,
'origin': order.name,
'route_ids': order.picking_type_id.warehouse_id and [(6, 0, [x.id for x in order.picking_type_id.warehouse_id.route_ids])] or [],
}]
#if the order line has a bigger quantity than the procurement it was for (manually changed or minimal quantity), then