[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
This commit is contained in:
Goffin Simon 2015-09-04 11:15:34 +02:00
parent b429621676
commit ba8ef420eb
1 changed files with 1 additions and 1 deletions

View File

@ -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):