[FIX]:override copy method to avoid keeping previous line

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

bzr revid: ksa@tinyerp.com-20120106125914-sog04nup6jm92g25
This commit is contained in:
Kirti Savalia (OpenERP) 2012-01-06 18:29:14 +05:30
parent 2e8f105c3b
commit db6ef2615b
1 changed files with 7 additions and 0 deletions

View File

@ -2613,6 +2613,13 @@ class stock_inventory(osv.osv):
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.inventory', context=c)
}
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default = default.copy()
default.update({'move_ids': [], 'date_done': False})
return super(stock_inventory, self).copy(cr, uid, id, default, context=context)
def _inventory_line_hook(self, cr, uid, inventory_line, move_vals):
""" Creates a stock move from an inventory line
@param inventory_line: