Package: odoo13-addon-barcodes-generator-abstract
This module extends Odoo functionality, allowing user to generate barcode
depending on a given barcode rule for any Model.For example, a typical pattern for products is  “20…..{NNNDD}” that means
that:
* the EAN13 code will begin by ‘20’
* followed by 5 digits (named Barcode Base in this module)
* and after 5 others digits to define the variable price
* a 13 digit controlWith this module, it is possible to:Affect a pattern (barcode.rule) to a modelDefine a Barcode base:manually, if the base of the barcode must be set by a user. (typically an
internal code defined in your company)automaticaly by a sequence, if you want to let Odoo to increment a
sequence. (typical case of a customer number incrementation)Generate a barcode, based on the defined pattern and the barcode baseTable of contentsInstallationConfigurationUsageDevelopmentNoteKnown issues / RoadmapBug TrackerCreditsAuthorsContributorsOther creditsImagesMaintainersInstallationThis module use an extra python library named ‘python-barcode’ you should install
to make barcode generation works properly.sudo pip installpython-barcodeConfigurationTo configure this module, you need to:Go to Settings / Technical / Sequences & Identifiers / Barcode NomenclaturesSelect a NomenclatureCreate or select a ruleFor manual generation, set:‘Base set Manually’ in ‘Generate Type’Set the modelFor automatic generation, set:‘Base managed by Sequence’ in ‘Generate Type’Set the modelGenerate a new sequence by button, or affect a existing oneIn all cases, padding will be computed automaticaly, based on the number
of ‘.’ in the Barcode Pattern field.UsageThis module is an abstract module. You can configure Barcode Rule, but to
enable this feature, you need to install an extra module for a given model.
This repository provide ‘barcodes_generator_product’ and
‘barcodes_generator_partner’ module to generate barcode for product or partner
model.Alternatively, you can develop a custom module for a custom model. See
‘Inheritance’ parts.DevelopmentIf you want to generate barcode for another model, you can create a custom
module that inherits on ‘barcodes_generator_abstract’ and inherit your model
like that:class MyModel(models.Model):_name = ‘my.model’
_inherit = [‘my.model’, ‘barcode.generate.mixin’]class barcode_rule(models.Model):_inherit = ‘barcode.rule’generate_model = fields.Selection(selection_add=[(‘my.model’, ‘My Model’)])Finally, you should inherit your model view adding buttons and fields.NoteYour model should have a field ‘barcode’ defined.Known issues / RoadmapOn barcode.rule model, constraint and domain system could be set between
‘type’ and ‘generate_model’ fields.Cache is being cleared in a constraint inbarcode.rule. Mutating in a
constraint is bad practice & should be moved somewhere.Bug TrackerBugs are tracked onGitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomedfeedback.Do not contact contributors directly about support or help with technical issues.CreditsAuthorsGRAPLa LouveLasLabsContributorsSylvain LE GAL (https://twitter.com/legalsylvain)Dave Lasley <dave@laslabs.com>Tecnativa:Carlos RocaOther creditsImagesIcon of the module is based on the Oxygen Team work and is under LGPL licence:http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org.htmlMaintainersThis module is maintained by the OCA.OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.This module is part of theOCA/stock-logistics-barcodeproject on GitHub.You are welcome to contribute. To learn how please visithttps://odoo-community.org/page/Contribute.