Better naming of picking
Use sequence if it is the default name bzr revid: ced-4979948d9d614232a684442d3dc4e6de2faa0906
This commit is contained in:
parent
799bde8603
commit
e890e73379
|
@ -391,8 +391,9 @@ class stock_picking(osv.osv):
|
|||
self.write(cr, uid, ids, {'state': 'confirmed'})
|
||||
todo = []
|
||||
for picking in self.browse(cr, uid, ids):
|
||||
number = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.%s' % picking.type)
|
||||
self.write(cr, uid, [picking.id], {'name': number})
|
||||
if picking.name == self._defaults['name']():
|
||||
number = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.%s' % picking.type)
|
||||
self.write(cr, uid, [picking.id], {'name': number})
|
||||
for r in picking.move_lines:
|
||||
if r.state=='draft':
|
||||
todo.append(r.id)
|
||||
|
|
Loading…
Reference in New Issue