Browse Source

[RMV] Init Removed

pull/79/merge
Sreejith P 7 years ago
parent
commit
98f7085a85
  1. 6
      product_barcode/models/product_form.py

6
product_barcode/models/product_form.py

@ -16,12 +16,6 @@ class ProductAutoBarcode(models.Model):
res.barcode = ean res.barcode = ean
return res return res
def init(self):
products = self.env['product.product'].search([])
for product in products:
ean = generate_ean(str(product.id))
product.barcode = ean
def ean_checksum(eancode): def ean_checksum(eancode):
"""returns the checksum of an ean string of length 13, returns -1 if the string has the wrong length""" """returns the checksum of an ean string of length 13, returns -1 if the string has the wrong length"""

Loading…
Cancel
Save