[FIX] stock: reset date_done field at duplication

As the state is reset to draft, makes no sense to keep date of completion.
This commit is contained in:
Akash Balar 2014-11-25 15:32:55 +05:30 committed by Martin Trigaux
parent 0b684b950f
commit 4ba72fbacb
1 changed files with 1 additions and 0 deletions

View File

@ -725,6 +725,7 @@ class stock_picking(osv.osv):
default.setdefault('backorder_id', False)
if 'invoice_state' not in default and picking_obj.invoice_state == 'invoiced':
default['invoice_state'] = '2binvoiced'
default.setdefault('date_done', False)
res = super(stock_picking, self).copy(cr, uid, id, default, context)
return res