[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:
parent
2e8f105c3b
commit
db6ef2615b
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue