Skip to content
Snippets Groups Projects
Commit 030e635b authored by Luis Manuel [Vauxoo]'s avatar Luis Manuel [Vauxoo]
Browse files

[FIX] point_of_sale: handle singleton exception for PoS config


Before this commit a singleton error is raised when writing to several
PoS configs at the same time.

After this commit, it is possible to write on multiple records at the
same time.

closes odoo/odoo#135586

Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
parent bb0c4abc
Branches
Tags
No related merge requests found
......@@ -343,14 +343,14 @@ class PosConfig(models.Model):
@api.constrains('limited_partners_amount', 'limited_partners_loading')
def _check_limited_partners(self):
for rec in self:
if rec.limited_partners_loading and not self.limited_partners_amount:
if rec.limited_partners_loading and not rec.limited_partners_amount:
raise ValidationError(
_("Number of partners loaded can not be 0"))
@api.constrains('limited_products_amount', 'limited_products_loading')
def _check_limited_products(self):
for rec in self:
if rec.limited_products_loading and not self.limited_products_amount:
if rec.limited_products_loading and not rec.limited_products_amount:
raise ValidationError(
_("Number of product loaded can not be 0"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment