[MERGE] lp:893130 (stock: copy of picking in state 'invoiced' must be in state '2binvoiced')

bzr revid: rco@openerp.com-20111130092600-0kmviu7ip8u9g0oq
This commit is contained in:
Raphael Collet 2011-11-30 10:26:00 +01:00
commit 704d9c9b26
1 changed files with 2 additions and 0 deletions

View File

@ -694,6 +694,8 @@ class stock_picking(osv.osv):
default['name'] = self.pool.get('ir.sequence').get(cr, uid, seq_obj_name)
default['origin'] = ''
default['backorder_id'] = False
if picking_obj.invoice_state == 'invoiced':
default['invoice_state'] = '2binvoiced'
res=super(stock_picking, self).copy(cr, uid, id, default, context)
if res:
picking_obj = self.browse(cr, uid, res, context=context)