Skip to content

Commit

Permalink
[IMP] Filter payment methods configured in the POS.
Browse files Browse the repository at this point in the history
  • Loading branch information
zamberjo committed May 31, 2023
1 parent bf8034e commit ceb033a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pos_no_cash_bank_statement/models/pos_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def _accumulate_amounts(self, data):
# I have to do that because the method
# _create_cash_statement_lines_and_cash_move_lines()
# reads payment_method_id.cash_journal_id
payment_methods_bank_statement = self.env["pos.payment.method"].search(
[
("is_cash_count", "=", False),
("bank_statement", "=", True),
("cash_journal_id", "!=", False),
]
payment_methods_bank_statement = self.config_id.payment_method_ids.filtered(
lambda payment_method: (
not payment_method.is_cash_count
and payment_method.bank_statement
and payment_method.cash_journal_id
)
)
if payment_methods_bank_statement:
self.write(
Expand Down

0 comments on commit ceb033a

Please sign in to comment.