[FIX] stock_landed_costs : Automatic computation of landed cost when we save the record.

bzr revid: mdi@tinyerp.com-20140424130403-3tqm8okdqwgzkm73
This commit is contained in:
DJ Patel 2014-04-24 18:34:03 +05:30
parent 301b9a70eb
commit f5a285267c
1 changed files with 5 additions and 0 deletions

View File

@ -104,6 +104,11 @@ class stock_landed_cost(osv.osv):
'date': lambda *a: time.strftime('%Y-%m-%d'),
}
def write(self, cr, uid, ids, vals, context=None):
res = super(stock_landed_cost, self).write(cr, uid, ids, vals, context=context)
self.compute_landed_cost(cr, uid, ids, context=context)
return res
def copy(self, cr, uid, id, default=None, context=None):
default = {} if default is None else default.copy()
default.update({