[FIX]:original invoice state is invoiced when copied that picking invoice state should be 2binvoiced

lp bug: https://launchpad.net/bugs/893130 fixed

bzr revid: ksa@tinyerp.com-20111122062437-ypsyglttjoa86eek
This commit is contained in:
Kirti Savalia (OpenERP) 2011-11-22 11:54:37 +05:30
parent 0e8b913842
commit f54d12eb4c
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)