Skip to content

Commit

Permalink
[FIX] the method _check_pos_session_balance is deleted in point_of_sale
Browse files Browse the repository at this point in the history
  • Loading branch information
julenfl committed Feb 22, 2023
1 parent 16a66fa commit c4582f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion pos_payment_change/tests/test_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,4 @@ def test_03_payment_change_closed_orders(self):
with self.assertRaises(UserError):
self._change_payment(
order, self.cash_payment_method, 10, self.bank_payment_method, 90
)
)
6 changes: 0 additions & 6 deletions pos_payment_change/wizards/pos_payment_change_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ def button_change_payment(self):

orders = order.change_payment(new_payments)

# Note. Because of the poor design of the closing session process
# in Odoo, we call _check_pos_session_balance() that sets
# balance_end_real with balance_end for "non cash" journals
if order.session_id.state == "closing_control":
order.session_id._check_pos_session_balance()

if len(orders) == 1:
# if policy is 'update', only close the pop up
action = {"type": "ir.actions.act_window_close"}
Expand Down

0 comments on commit c4582f7

Please sign in to comment.