[FIX] account: residual amount need to be recomputed on change of move_id

bzr revid: qdp-launchpad@openerp.com-20110621145658-evrsg4y9w076mp7q
This commit is contained in:
Luc De Meyer
2011-06-21 16:56:58 +02:00
committed by Quentin (OpenERP)
parent 9f60b2fc2e
commit b7ace1edb8
+1 -1
View File
@@ -265,7 +265,7 @@ class account_invoice(osv.osv):
'move_lines':fields.function(_get_lines, method=True, type='many2many', relation='account.move.line', string='Entry Lines'),
'residual': fields.function(_amount_residual, method=True, digits_compute=dp.get_precision('Account'), string='Residual',
store={
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line'], 50),
'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line','move_id'], 50),
'account.invoice.tax': (_get_invoice_tax, None, 50),
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 50),
'account.move.line': (_get_invoice_from_line, None, 50),