From ba8ef420eb97d2a9c0a731d2b59204d33b5caa4e Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Fri, 4 Sep 2015 11:15:34 +0200 Subject: [PATCH] [FIX] account: Put Money In When a account.bank.statement.line is created by clicking on "Put Money In" (Accounting(Menu)>Bank and Cash(Menu)>Cash Registers(Menu)>More(Button)>"Put Money In"), the account.bank.statement linked to this line must be updated(by passing in the write of this model) to compute the real closing balance. This fix allow to have the same behaviour than when a line is manually added (with "Add Item) in an account.bank.statement. opw:647631 --- addons/account/wizard/pos_box.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/wizard/pos_box.py b/addons/account/wizard/pos_box.py index 5edfa9d0e7b..4740ef83dfe 100644 --- a/addons/account/wizard/pos_box.py +++ b/addons/account/wizard/pos_box.py @@ -41,7 +41,7 @@ class CashBox(osv.osv_memory): def _create_bank_statement_line(self, cr, uid, box, record, context=None): values = self._compute_values_for_statement_line(cr, uid, box, record, context=context) - return self.pool.get('account.bank.statement.line').create(cr, uid, values, context=context) + return self.pool.get('account.bank.statement').write(cr, uid, [record.id], {'line_ids': [(0, False, values)]}, context=context) class CashBoxIn(CashBox):