summaryrefslogtreecommitdiff
path: root/addons/barcodes
diff options
context:
space:
mode:
authorVictor Feyens <vfe@odoo.com>2020-07-15 16:58:41 +0000
committerVictor Feyens <vfe@odoo.com>2020-07-22 11:01:28 +0000
commitb932ea75fec28052d8bc262c590171dfa97ef4e9 (patch)
tree15f122104417045062c4475712019ae0e22649c0 /addons/barcodes
parentec56db3c66bb3b4b7ba6e11ce547ab1412cb5b75 (diff)
[FIX] barcodes: wrong translation specification
String formatting was wrong because the mapping wasn't specified. Finetuning of https://github.com/odoo/odoo/commit/8a8d482b43394f834bc0ddf3cb0c0c62f11b90b1
Diffstat (limited to 'addons/barcodes')
-rw-r--r--addons/barcodes/models/barcodes.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/barcodes/models/barcodes.py b/addons/barcodes/models/barcodes.py
index 4678ab39b4e..1d2ba68fb20 100644
--- a/addons/barcodes/models/barcodes.py
+++ b/addons/barcodes/models/barcodes.py
@@ -195,10 +195,10 @@ class BarcodeRule(models.Model):
findall = re.findall("[{]|[}]", p) # p does not contain escaped { or }
if len(findall) == 2:
if not re.search("[{][N]*[D]*[}]", p):
- raise ValidationError(_("There is a syntax error in the barcode pattern %(pattern)s: braces can only contain N's followed by D's.", rule.pattern))
+ raise ValidationError(_("There is a syntax error in the barcode pattern %(pattern)s: braces can only contain N's followed by D's.", pattern=rule.pattern))
elif re.search("[{][}]", p):
- raise ValidationError(_("There is a syntax error in the barcode pattern %(pattern)s: empty braces.", rule.pattern))
+ raise ValidationError(_("There is a syntax error in the barcode pattern %(pattern)s: empty braces.", pattern=rule.pattern))
elif len(findall) != 0:
- raise ValidationError(_("There is a syntax error in the barcode pattern %(pattern)s: a rule can only contain one pair of braces.", rule.pattern))
+ raise ValidationError(_("There is a syntax error in the barcode pattern %(pattern)s: a rule can only contain one pair of braces.", pattern=rule.pattern))
elif p == '*':
raise ValidationError(_(" '*' is not a valid Regex Barcode Pattern. Did you mean '.*' ?"))