Skip to content

Commit

Permalink
Merge PR #1014 into 18.0
Browse files Browse the repository at this point in the history
Signed-off-by etobella
  • Loading branch information
OCA-git-bot committed Feb 15, 2025
2 parents 0e27d6c + ec984b8 commit 5650c8c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sequence_check_digit/models/ir_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ class IrSequence(models.Model):

@api.constrains("check_digit_formula", "prefix", "suffix")
def check_check_digit_formula(self):
try:
self.get_next_char(0)
except Exception as err:
raise ValidationError(self.env._("Format is not accepted")) from err
for record in self:
try:
record.get_next_char(0)
except Exception as err:
raise ValidationError(self.env._("Format is not accepted")) from err

def get_check_digit(self, code):
try:
Expand Down

0 comments on commit 5650c8c

Please sign in to comment.