|
|
@ -45,10 +45,8 @@ class POSBankStatementUpdateClosingBalance(models.TransientModel): |
|
|
|
raise UserError(_('You cannot start the closing ' |
|
|
|
'balance for multiple POS sessions')) |
|
|
|
session = session_obj.browse(active_ids[0]) |
|
|
|
for statement in session.statement_ids: |
|
|
|
if statement.journal_id.type != 'cash' or \ |
|
|
|
(statement.journal_id.type == 'cash' and |
|
|
|
not session.cash_control): |
|
|
|
for statement in session.statement_ids.filtered( |
|
|
|
lambda s: s.journal_id.pos_control_ending_balance): |
|
|
|
items.append([0, 0, self._prepare_item(session, statement)]) |
|
|
|
res["session_id"] = session.id |
|
|
|
res["item_ids"] = items |
|
|
|