Search 1.9 billion lines of Odoo code on GitHub

barcodes_generate

Author: GRAP,La Louve,Odoo Community Association (OCA)
License: AGPL-3
Branch: 9.0_PORT_barcodes_generate
Repository: legalsylvain/pos
Dependencies: barcodes, point_of_sale, and product
Languages: PO File (93, 14.6%), Python (234, 36.7%), XML (213, 33.4%), and reStructuredText (98, 15.4%)
Other repositories: AwesomeFoodCoops/odoo-production, DITIntl/odoo-production, Groupe-Informatique-LaCoopSurMer/odoo-production, Otsokop/odoo-production, Supercagette/odoo-addons-misc, azmeuk/odoo-production, babatoko/odoo-production, beloeuvre/odoo-production, chetanrdhaduk/odoo-production, demain-supermarche/odoo-production, druidoo/FoodCoops, dzungtran89/odoo-production, estevebadia/odoo-production, fjouatte/odoo-production, grap/odoo-addons-misc, halgandd/odoo-production, hilarak/odoo-production, jweste/odoo-production, krunal267/odoo-production, lachouettecoop/odoo-production, legalsylvain/odoo-addons-misc, legalsylvain/odoo-production, mathieuvatel/odoo-production, minimedj/odoo-addons-misc, mszinte/odoo-production, mulaudzicalvin/odoo-production, nthnnl/odoo-production, odoo-modules/odoo-production, petrus-v/odoo-foodcoops, phuctranerp/odoo-production, quentinDupont/odoo-addons-misc, rihene-abdelwahed/odoo-production, rkhalil1990/odoo-addons-misc, sc4you/odoo-production, siddharth7815/odoo-production, sprevot44/odoo-production, suningwz/odoo-production, supercoopbdx/odoo-production, superquinquin/odoo-production, trobz/odoo-production, ttpphuctran/odoo-production, vidtsin/odoo-production, and yuntux/odoo-production

<a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.svg"> </a> <a name="generate-barcodes-for-products-and-customers"></a> <h2>Generate Barcodes for Products and Customers</h2> <p>This module expends Odoo functionnality, allowing user to generate barcode depending on a given barcode rule.</p> <p>For exemple, a typical pattern for products is &quot;20.....{NNNDD}&quot; 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 control</p> <p>With this module, it is possible to:</p> <ul class="simple"> <li>Affect a pattern (barcode.rule) to a product.product or a res.partner</li> <li><dl class="first docutils"> <dt>Define a Barcode base:</dt> <dd><ul class="first last"> <li>manually, if the base of the barcode must be set by a user. (typically an internal code defined in your company)</li> <li>automaticaly by a sequence, if you want to let Odoo to increment a sequence. (typical case of a customer number incrementation)</li> </ul> </dd> </dl> </li> <li>Generate a barcode, based on the defined pattern and the barcode base</li> </ul> <a name="installation"></a> <h3>Installation</h3> <p>This module use an extra python librairy named 'pyBarcode' you should install to make barcode generation works properly.</p> <p>sudo pip install pyBarcode</p> <a name="configuration"></a> <h3>Configuration</h3> <p>To configure this module, you need to:</p> <ul class="simple"> <li>Go to Point Of Sale / Configuration / Barcode Nomenclatures and select</li> <li>Select a Nomenclature</li> <li>Create or select a rule</li> </ul> <img alt="/barcodes_generate/static/description/barcode_rule_tree.png" src="/barcodes_generate/static/description/barcode_rule_tree.png" /> <ul class="simple"> <li><dl class="first docutils"> <dt>For manual generation, set:</dt> <dd><ul class="first last"> <li>'Base set Manually' in 'Generate Type'</li> <li>Set the model</li> </ul> </dd> </dl> </li> </ul> <img alt="/barcodes_generate/static/description/barcode_rule_form_manual.png" src="/barcodes_generate/static/description/barcode_rule_form_manual.png" /> <ul class="simple"> <li><dl class="first docutils"> <dt>For automatic generation, set:</dt> <dd><ul class="first last"> <li>'Base managed by Sequence' in 'Generate Type'</li> <li>Set the model</li> <li>Generate a new sequence by button, or affect a existing one</li> </ul> </dd> </dl> </li> </ul> <img alt="/barcodes_generate/static/description/barcode_rule_form_sequence.png" src="/barcodes_generate/static/description/barcode_rule_form_sequence.png" /> <p>In all cases, padding will be computed automaticaly, based on the number of '.' in the Barcode Pattern field.</p> <a name="usage"></a> <h3>Usage</h3> <p>To use this module, you need to:</p> <ul class="simple"> <li>Go to a Product form (or a Partner Form):</li> </ul> <dl class="docutils"> <dt>1 for manual generation</dt> <dd><ul class="first last simple"> <li>Set a Barcode Rule</li> <li>Set a Barcode Base</li> <li>click on the button 'Generate Barcode (Using Barcode Rule)'</li> </ul> </dd> </dl> <img alt="/barcodes_generate/static/description/product_template_manual_generation.png" src="/barcodes_generate/static/description/product_template_manual_generation.png" /> <dl class="docutils"> <dt>2 for automatic generation</dt> <dd><ul class="first last simple"> <li>Set a Barcode Rule</li> <li>click on the button 'Generate Barcode (Using Barcode Rule)'</li> </ul> </dd> </dl> <img alt="/barcodes_generate/static/description/res_partner_sequence_generation.png" src="/barcodes_generate/static/description/res_partner_sequence_generation.png" /> <p>Try this module on Runbot</p> <a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/184/9.0"><img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" /></a> <a name="inheritance"></a> <h3>Inheritance</h3> <p>If you want to generate barcode for another model, you can create a custom module that inherits on 'barcodes_generate' and inherit your model like that:</p> <dl class="docutils"> <dt>class MyModel(models.Model):</dt> <dd>_name = 'my.model' _inherit = ['my.model', 'barcode.generate.mixin']</dd> <dt>class barcode_rule(models.Model):</dt> <dd><p class="first">_inherit = 'barcode.rule'</p> <p class="last">generate_model = fields.Selection(selection_add=[('my.model', 'My Model')])</p> </dd> </dl> <p>Finally, you should inherit your model view adding buttons and fields.</p> <a name="note"></a> <h4>Note</h4> <p>Your model should have a field 'barcode' defined.</p> <a name="known-issues-roadmap"></a> <h3>Known issues / Roadmap</h3> <p>1. Dependency to point_of_sale is required because barcode field, defined in 'base' module (in the res.partner model), is defined in a 'point_of_sale' view. Furthermore, barcode nomenclature menu is available on Point Of Sale submenu.</p> <p>It's a relative problem, because product barcodes generation will occures mostly in a Point of Sale context.</p> <p>You could comment 'point_of_sale' dependencies if you want to use this module without point of sale installed.</p> <p>2. On barcode.rule model, constraint and domain system could be set between 'type' and 'generate_model' fields.</p> <a name="bug-tracker"></a> <h3>Bug Tracker</h3> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.</p> <a name="credits"></a> <h3>Credits</h3> <a name="images"></a> <h4>Images</h4> <ul class="simple"> <li>Icon of the module is based on the Oxygen Team work and is under LGPL licence: <a class="reference external" href="http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org.html">http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org.html</a></li> </ul> <a name="contributors"></a> <h4>Contributors</h4> <ul class="simple"> <li>Sylvain LE GAL (<a class="reference external" href="https://twitter.com/legalsylvain">https://twitter.com/legalsylvain</a>)</li> </ul> <a name="maintainer"></a> <h4>Maintainer</h4> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>This module is maintained by the OCA.</p> <p>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.</p> <p>To contribute to this module, please visit <a class="reference external" href="https://odoo-community.org">https://odoo-community.org</a>.</p>