[FIX] point_of_sale: payment terminal credentials in cash payment method

Hide all fields related to payment terminal if the payment method is
cash.
This commit is contained in:
Joseph Caburnay
2019-09-12 05:34:09 +00:00
parent a3845ae3f0
commit a0c5a3cc4a
@@ -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)