[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
This commit is contained in:
uco (OpenERP)
2010-04-21 15:11:30 +05:30
parent 510b4f306c
commit e6a45a2107
+4 -1
View File
@@ -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,