[FIX]add PO name to origin field when generating picking from PO

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

bzr revid: csn@openerp.com-20140120103048-ebb2ow8rutn2gs21
This commit is contained in:
Cedric Snauwaert 2014-01-20 11:30:48 +01:00
parent 2f8864e0a0
commit 49104e9108
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