Skip to content

Commit

Permalink
[MERGE] Fix ported from 6.0.0: Can't set a default origin for stock p…
Browse files Browse the repository at this point in the history
…ickings at duplication time

https://launchpad.net/bugs/1098557
  • Loading branch information
Numerigraphe - Lionel Sausin authored and Stefan Rijnhart committed Jul 2, 2014
1 parent 4df893e commit 4335f32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/stock/stock.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,9 @@ def copy(self, cr, uid, id, default=None, context=None):
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
if 'origin' not in default:
default['origin'] = ''
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)
Expand Down

0 comments on commit 4335f32

Please sign in to comment.