From 855b29b6d0fc22b6d333bc470a04e60c84fffe73 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 30 Oct 2019 10:22:50 +0000 Subject: [PATCH] [FIX] point_of_sale: cash balance - Go to POS application - Click on the 3 dots of the session to open configuration - Remove the "Cash" payment method and just keep "Bank" - Open the session, proceed to a sell and close it. - Try to open the session either clicking on "Close" on the kanban card `CacheMiss` error. opw-2116470 closes odoo/odoo#39570 X-original-commit: 62cb92644de3cfa6e7864583d1efcaf5821f05e4 Signed-off-by: Nicolas Martinelli (nim) --- addons/point_of_sale/models/pos_session.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/point_of_sale/models/pos_session.py b/addons/point_of_sale/models/pos_session.py index b8d6bb440ba..6820ba3b679 100644 --- a/addons/point_of_sale/models/pos_session.py +++ b/addons/point_of_sale/models/pos_session.py @@ -112,6 +112,10 @@ class PosSession(models.Model): ) session.cash_register_balance_end = session.cash_register_balance_start + session.cash_register_total_entry_encoding session.cash_register_difference = session.cash_register_balance_end_real - session.cash_register_balance_end + else: + session.cash_register_total_entry_encoding = 0.0 + session.cash_register_balance_end = 0.0 + session.cash_register_difference = 0.0 @api.depends('order_ids.payment_ids.amount') def _compute_total_payments_amount(self):