-
-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] barcodes_generator_abstract: Migration to 14.0
- Loading branch information
1 parent
9883072
commit 5009673
Showing
8 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
To configure this module, you need to: | ||
|
||
* Go to Settings / Technical / Sequences & Identifiers / Barcode Nomenclatures | ||
* Select a Nomenclature | ||
* Create or select a rule | ||
|
||
.. image:: /barcodes_generator_abstract/static/description/barcode_rule_tree.png | ||
|
||
* For manual generation, set: | ||
* 'Base set Manually' in 'Generate Type' | ||
* Set the model | ||
|
||
.. image:: /barcodes_generator_abstract/static/description/barcode_rule_form_manual.png | ||
|
||
* For automatic generation, set: | ||
* 'Base managed by Sequence' in 'Generate Type' | ||
* Set the model | ||
* Generate a new sequence by button, or affect a existing one | ||
|
||
.. 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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* Sylvain LE GAL (https://twitter.com/legalsylvain) | ||
* Dave Lasley <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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: | ||
* 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 | ||
|
||
With this module, it is possible to: | ||
|
||
* Affect a pattern (barcode.rule) to a model | ||
|
||
* Define 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 base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This module use an extra python library named 'python-barcode' you should install | ||
to make barcode generation works properly. | ||
|
||
``sudo pip install python-barcode`` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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. | ||
|
||
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. | ||
|
||
Note | ||
---- | ||
|
||
Your model should have a field 'barcode' defined. |