diff --git a/product_barcode_generator/data/barcode_rule.xml b/product_barcode_generator/data/barcode_rule.xml index 7c01c7183..a0b4f9a3f 100644 --- a/product_barcode_generator/data/barcode_rule.xml +++ b/product_barcode_generator/data/barcode_rule.xml @@ -1,8 +1,8 @@ - - Beescoop Product Barcodes + + product_barcode_generator 1 product 043 diff --git a/product_barcode_generator/models/product_template.py b/product_barcode_generator/models/product_template.py index 67a2a69e1..66358663f 100644 --- a/product_barcode_generator/models/product_template.py +++ b/product_barcode_generator/models/product_template.py @@ -17,7 +17,7 @@ def generate_barcode(self): self.ensure_one() if self.to_weight: seq_internal_code = self.env.ref( - "beesdoo_product.seq_ean_product_internal_ref" + "product_barcode_generator.seq_ean_product_internal_ref" ) bc = "" if not self.default_code: @@ -38,7 +38,7 @@ def generate_barcode(self): bc = ean[0:12] + str(self.env["barcode.nomenclature"].ean_checksum(ean)) else: rule = self.env["barcode.rule"].search( - [("name", "=", "Beescoop Product Barcodes")] + [("name", "=", "product_barcode_generator")] )[0] size = 13 - len(rule.pattern) ean = rule.pattern + str(uuid.uuid4().fields[-1])[:size]