From e6a45a21079eb8911067b2e70f184ba4c71f7420 Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Wed, 21 Apr 2010 15:11:30 +0530 Subject: [PATCH] [IMP] stock: (1) Task ID 303: rename picking sequences IN/00001, OUT/00001, INT/00001. (2) Task ID 577: The sequences IN OUT INT are defined but they are not used correctly. (3) Added sequence for delivery orders (DLV/00001). bzr revid: uco@tinyerp.co.in-20100421094130-dybbu1l6b5x7ai9q --- addons/stock/stock.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 7d8fd5b97c1..a02ab3f1a03 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1339,8 +1339,11 @@ class stock_move(osv.osv): new_moves = [] for picking, todo in self._chain_compute(cr, uid, moves, context).items(): ptype = self.pool.get('stock.location').picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0]) + pick_name = '' + if ptype == 'delivery': + pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.delivery') pickid = self.pool.get('stock.picking').create(cr, uid, { - 'name': picking.name, + 'name': pick_name or picking.name, 'origin': str(picking.origin or ''), 'type': ptype, 'note': picking.note,