Skip to content

Commit

Permalink
[FIX] member_card: use standard sanitize function
Browse files Browse the repository at this point in the history
  • Loading branch information
robinkeunen committed Jan 11, 2024
1 parent 4cfed27 commit 801900e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion member_card/models/membercard.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _compute_bar_code(self):
rule = self.env.ref("point_of_sale.barcode_rule_client")
size = 13 - len(rule.pattern)
ean = rule.pattern + str(uuid.uuid4().fields[-1])[:size]
ean = ean[0:12] + str(self.env["barcode.nomenclature"].ean_checksum(ean))
ean = self.env["barcode.nomenclature"].sanitize_ean(ean)
except ValueError:
ean = ean[:13]
return ean
Expand Down

0 comments on commit 801900e

Please sign in to comment.