summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2015-09-04 11:15:34 +0200
committerGoffin Simon <sig@odoo.com>2015-09-04 16:52:40 +0200
commitba8ef420eb97d2a9c0a731d2b59204d33b5caa4e (patch)
treec24e98345f627d2a65571e95b684f78befe1bb26
parentb429621676c23071962c660b7b107d105a0b9007 (diff)
[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
-rw-r--r--addons/account/wizard/pos_box.py2
1 files changed, 1 insertions, 1 deletions
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):