From 81d995cf5450956e1c664cb5528d98bb9849bb64 Mon Sep 17 00:00:00 2001
From: pedrambiria <pebr@odoo.com>
Date: Mon, 22 May 2023 09:10:06 +0000
Subject: [PATCH] [REV] point_of_sale: allow multiple cash payment methods in
 PoS

We are reverting this commit (f9da3590261b304f9c12f01f5800cec50faebc1a) because
it is not compliant to the stable policy and is blocking users that had more than one cash
payment methods in configuring their pos.

opw-3331677

closes odoo/odoo#121959

X-original-commit: e61ceb547705878c912dc72900ea4762792173e0
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
---
 addons/point_of_sale/i18n/point_of_sale.pot | 7 -------
 addons/point_of_sale/models/pos_config.py   | 7 -------
 2 files changed, 14 deletions(-)

diff --git a/addons/point_of_sale/i18n/point_of_sale.pot b/addons/point_of_sale/i18n/point_of_sale.pot
index afcd99ae40ce..a7fd33329e75 100644
--- a/addons/point_of_sale/i18n/point_of_sale.pot
+++ b/addons/point_of_sale/i18n/point_of_sale.pot
@@ -7082,13 +7082,6 @@ msgid ""
 "                    Or you can add demo data for testing purpose. Please mind that this is an irreversible action."
 msgstr ""
 
-#. module: point_of_sale
-#. odoo-python
-#: code:addons/point_of_sale/models/pos_config.py:0
-#, python-format
-msgid "You can only have one cash payment method."
-msgstr ""
-
 #. module: point_of_sale
 #. odoo-python
 #: code:addons/point_of_sale/models/pos_order.py:0
diff --git a/addons/point_of_sale/models/pos_config.py b/addons/point_of_sale/models/pos_config.py
index 3ce7ce67bdf1..48255be5ce11 100644
--- a/addons/point_of_sale/models/pos_config.py
+++ b/addons/point_of_sale/models/pos_config.py
@@ -183,13 +183,6 @@ class PosConfig(models.Model):
         for config in self:
             config.cash_control = bool(config.payment_method_ids.filtered('is_cash_count'))
 
-    @api.onchange('payment_method_ids')
-    def _check_cash_payment_method(self):
-        for config in self:
-            if len(config.payment_method_ids.filtered('is_cash_count')) > 1:
-                config.payment_method_ids = config.payment_method_ids._origin
-                raise ValidationError(_('You can only have one cash payment method.'))
-
     @api.depends('company_id')
     def _compute_company_has_template(self):
         for config in self:
-- 
GitLab