[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#122882 X-original-commit: 81d995cf5450956e1c664cb5528d98bb9849bb64 Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com> Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
This commit is contained in:
@@ -7379,13 +7379,6 @@ msgstr ""
|
||||
msgid "You can go to"
|
||||
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
|
||||
|
||||
@@ -172,13 +172,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:
|
||||
|
||||
Reference in New Issue
Block a user