Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
odoo12-addon-barcodes-generator-abstract
Advanced tools
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3
This module expends 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:
With this module, it is possible to:
Affect a pattern (barcode.rule) to a model
Define a Barcode base:
Generate a barcode, based on the defined pattern and the barcode base
This module use an extra python library named 'python-barcode' you should install to make barcode generation works properly.
sudo pip install python-barcode
To configure this module, you need to:
.. image:: /barcodes_generator_abstract/static/description/barcode_rule_tree.png
.. image:: /barcodes_generator_abstract/static/description/barcode_rule_form_manual.png
.. image:: /barcodes_generator_abstract/static/description/barcode_rule_form_sequence.png
In all cases, padding will be computed automaticaly, based on the number of '.' in the Barcode Pattern field.
This 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.
Try this module on Runbot
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot :target: https://runbot.odoo-community.org/runbot/150/10.0
If 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.
Your model should have a field 'barcode' defined.
barcode.rule
. Mutating in a
constraint is bad practice & should be moved somewhere.Bugs are tracked on GitHub Issues <https://github.com/OCA/stock-logistics-barcode/issues>
_. 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.
.. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org
This 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.
To contribute to this module, please visit https://odoo-community.org.
FAQs
Generate Barcodes for Any Models
We found that odoo12-addon-barcodes-generator-abstract demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.