[FIX] stock: more tolerant copy method
Allow setting origin/backorder when copying new stock.picking Fixes #379, lp:1098557
This commit is contained in:
parent
aed71f3962
commit
8af9fdfa06
|
@ -721,8 +721,8 @@ class stock_picking(osv.osv):
|
|||
if ('name' not in default) or (picking_obj.name == '/'):
|
||||
seq_obj_name = 'stock.picking.' + picking_obj.type
|
||||
default['name'] = self.pool.get('ir.sequence').get(cr, uid, seq_obj_name)
|
||||
default['origin'] = ''
|
||||
default['backorder_id'] = False
|
||||
default.setdefault('origin', False)
|
||||
default.setdefault('backorder_id', False)
|
||||
if 'invoice_state' not in default and picking_obj.invoice_state == 'invoiced':
|
||||
default['invoice_state'] = '2binvoiced'
|
||||
res = super(stock_picking, self).copy(cr, uid, id, default, context)
|
||||
|
|
Loading…
Reference in New Issue