From a0c5a3cc4a7327801b370ec0ce3c3d36d441e521 Mon Sep 17 00:00:00 2001 From: Joseph Caburnay Date: Wed, 11 Sep 2019 12:38:04 +0000 Subject: [PATCH] [FIX] point_of_sale: payment terminal credentials in cash payment method Hide all fields related to payment terminal if the payment method is cash. --- addons/point_of_sale/models/pos_payment_method.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/point_of_sale/models/pos_payment_method.py b/addons/point_of_sale/models/pos_payment_method.py index f890b3a7f2c..c8ef3390d7c 100644 --- a/addons/point_of_sale/models/pos_payment_method.py +++ b/addons/point_of_sale/models/pos_payment_method.py @@ -67,6 +67,8 @@ class PosPaymentMethod(models.Model): def _onchange_is_cash_count(self): if not self.is_cash_count: self.cash_journal_id = False + else: + self.use_payment_terminal = False def _is_write_forbidden(self, fields): return bool(fields and self.open_session_ids)