From c4582f79071871736cb0a7a8cd1b91325e3d2c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julen=20Z=C3=A1rate=20Ruiz?= Date: Wed, 22 Feb 2023 17:20:58 +0100 Subject: [PATCH] [FIX] the method _check_pos_session_balance is deleted in point_of_sale --- pos_payment_change/tests/test_module.py | 2 +- pos_payment_change/wizards/pos_payment_change_wizard.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/pos_payment_change/tests/test_module.py b/pos_payment_change/tests/test_module.py index 207a502aa2..2adfa80341 100644 --- a/pos_payment_change/tests/test_module.py +++ b/pos_payment_change/tests/test_module.py @@ -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 - ) + ) \ No newline at end of file diff --git a/pos_payment_change/wizards/pos_payment_change_wizard.py b/pos_payment_change/wizards/pos_payment_change_wizard.py index 79c323ed9d..d8f34fdcd8 100644 --- a/pos_payment_change/wizards/pos_payment_change_wizard.py +++ b/pos_payment_change/wizards/pos_payment_change_wizard.py @@ -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"}