From fbfab431c705b6bfbc483579d7bc7346dcd81b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81re=CC=81my=20Van=20Driessche?= Date: Wed, 20 Mar 2024 10:17:13 +0100 Subject: [PATCH] [IMP] barcodes_generator_abstract: pre-commit auto fixes --- barcodes_generator_abstract/README.rst | 142 ++++++++++-------- .../models/barcode_rule.py | 1 - barcodes_generator_abstract/pyproject.toml | 3 + .../readme/CONFIGURE.md | 24 +++ .../readme/CONFIGURE.rst | 23 --- .../readme/CONTRIBUTORS.md | 6 + .../readme/CONTRIBUTORS.rst | 9 -- barcodes_generator_abstract/readme/CREDITS.md | 5 + .../readme/CREDITS.rst | 5 - .../readme/DESCRIPTION.md | 23 +++ .../readme/DESCRIPTION.rst | 21 --- barcodes_generator_abstract/readme/INSTALL.md | 4 + .../readme/INSTALL.rst | 4 - barcodes_generator_abstract/readme/ROADMAP.md | 4 + .../readme/ROADMAP.rst | 4 - barcodes_generator_abstract/readme/USAGE.md | 30 ++++ barcodes_generator_abstract/readme/USAGE.rst | 30 ---- .../static/description/index.html | 89 ++++++----- requirements.txt | 2 + 19 files changed, 220 insertions(+), 209 deletions(-) create mode 100644 barcodes_generator_abstract/pyproject.toml create mode 100644 barcodes_generator_abstract/readme/CONFIGURE.md delete mode 100644 barcodes_generator_abstract/readme/CONFIGURE.rst create mode 100644 barcodes_generator_abstract/readme/CONTRIBUTORS.md delete mode 100644 barcodes_generator_abstract/readme/CONTRIBUTORS.rst create mode 100644 barcodes_generator_abstract/readme/CREDITS.md delete mode 100644 barcodes_generator_abstract/readme/CREDITS.rst create mode 100644 barcodes_generator_abstract/readme/DESCRIPTION.md delete mode 100644 barcodes_generator_abstract/readme/DESCRIPTION.rst create mode 100644 barcodes_generator_abstract/readme/INSTALL.md delete mode 100644 barcodes_generator_abstract/readme/INSTALL.rst create mode 100644 barcodes_generator_abstract/readme/ROADMAP.md delete mode 100644 barcodes_generator_abstract/readme/ROADMAP.rst create mode 100644 barcodes_generator_abstract/readme/USAGE.md delete mode 100644 barcodes_generator_abstract/readme/USAGE.rst create mode 100644 requirements.txt diff --git a/barcodes_generator_abstract/README.rst b/barcodes_generator_abstract/README.rst index 4c292b8d0c4e..1c76da9dc3eb 100644 --- a/barcodes_generator_abstract/README.rst +++ b/barcodes_generator_abstract/README.rst @@ -17,38 +17,41 @@ Generate Barcodes (Abstract) :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--barcode-lightgray.png?logo=github - :target: https://github.com/OCA/stock-logistics-barcode/tree/16.0/barcodes_generator_abstract + :target: https://github.com/OCA/stock-logistics-barcode/tree/17.0/barcodes_generator_abstract :alt: OCA/stock-logistics-barcode .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/stock-logistics-barcode-16-0/stock-logistics-barcode-16-0-barcodes_generator_abstract + :target: https://translation.odoo-community.org/projects/stock-logistics-barcode-17-0/stock-logistics-barcode-17-0-barcodes_generator_abstract :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-barcode&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-barcode&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module extends Odoo functionality, allowing user to generate barcode -depending on a given barcode rule for any Model. +This module extends Odoo functionality, allowing user to generate +barcode depending on a given barcode rule for any Model. For example, if the barcode pattern is "20.....{NNNDD}": -* the EAN13 code will begin with '20', -* followed by 5 digits (named *Barcode Base* in this module), -* followed by 5 others digits to define the variable price with 2 decimals, -* the last digit (the 13rd digit) is the control digit (i.e. the checksum). +- the EAN13 code will begin with '20', +- followed by 5 digits (named *Barcode Base* in this module), +- followed by 5 others digits to define the variable price with 2 + decimals, +- the last digit (the 13rd digit) is the control digit (i.e. the + checksum). With this module, it is possible to: -* Affect a pattern (barcode.rule) to a model +- 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). - * automatically by a sequence, if you want to let Odoo increment a +- 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). + - automatically by a sequence, if you want to let Odoo increment a sequence (typical case of a customer number incrementation). -* Generate a barcode, based on the defined pattern and the barcode base +- Generate a barcode, based on the defined pattern and the barcode base **Table of contents** @@ -58,8 +61,8 @@ With this module, it is possible to: Installation ============ -This module use an extra python library named 'python-barcode' you should install -to make barcode generation works properly. +This module use an extra python library named 'python-barcode' you +should install to make barcode generation works properly. ``sudo pip install python-barcode`` @@ -68,69 +71,77 @@ Configuration To configure this module, you need to: -* Go to Settings / Technical / Sequences & Identifiers / Barcode Nomenclatures -* Select a Nomenclature -* Create or select a rule +- Go to Settings / Technical / Sequences & Identifiers / Barcode + Nomenclatures +- Select a Nomenclature +- Create or select a rule + +|image| -.. image:: https://raw.githubusercontent.com/OCA/stock-logistics-barcode/16.0/barcodes_generator_abstract/static/description/barcode_nomenclature_form.png +- For manual generation, set: -* For manual generation, set: - * 'Base set Manually' in 'Generate Type' - * Set the model + - 'Base set Manually' in 'Generate Type' + - Set the model -.. image:: https://raw.githubusercontent.com/OCA/stock-logistics-barcode/16.0/barcodes_generator_abstract/static/description/barcode_rule_form_manual.png +|image1| -* 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 +- For automatic generation, set: -.. image:: https://raw.githubusercontent.com/OCA/stock-logistics-barcode/16.0/barcodes_generator_abstract/static/description/barcode_rule_form_sequence.png + - 'Base managed by Sequence' in 'Generate Type' + - Set the model + - Generate a new sequence by button, or affect a existing one + +|image2| In all cases, padding will be computed automaticaly, based on the number of '.' in the Barcode Pattern field. +.. |image| image:: https://raw.githubusercontent.com/OCA/stock-logistics-barcode/17.0/barcodes_generator_abstract/static/description/barcode_nomenclature_form.png +.. |image1| image:: https://raw.githubusercontent.com/OCA/stock-logistics-barcode/17.0/barcodes_generator_abstract/static/description/barcode_rule_form_manual.png +.. |image2| image:: https://raw.githubusercontent.com/OCA/stock-logistics-barcode/17.0/barcodes_generator_abstract/static/description/barcode_rule_form_sequence.png + Usage ===== -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. +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. -If you want to generate barcode for another model, you can create a custom -module that depend on 'barcodes_generator_abstract' and inherit your model -like that: +If you want to generate barcode for another model, you can create a +custom module that depend on 'barcodes_generator_abstract' and inherit +your model like that: -.. code:: +:: - class MyModel(models.Model): - _name = 'my.model' - _inherit = ['my.model', 'barcode.generate.mixin'] + class MyModel(models.Model): + _name = 'my.model' + _inherit = ['my.model', 'barcode.generate.mixin'] - class barcode_rule(models.Model): - _inherit = 'barcode.rule' + class barcode_rule(models.Model): + _inherit = 'barcode.rule' - generate_model = fields.Selection(selection_add=[('my.model', 'My Model')]) + generate_model = fields.Selection(selection_add=[('my.model', 'My Model')]) -Eventually, you should inherit your model view adding buttons and fields. +Eventually, you should inherit your model view adding buttons and +fields. Note -~~~~ +---- Your model should have a field 'barcode' defined. Known issues / Roadmap ====================== -* On barcode.rule model, constraint and domain system could be set between - 'type' and 'generate_model' fields. -* Cache is being cleared in a constraint in `barcode.rule`. Mutating in a - constraint is bad practice & should be moved somewhere. +- On barcode.rule model, constraint and domain system could be set + between 'type' and 'generate_model' fields. +- Cache is being cleared in a constraint in barcode.rule. Mutating in a + constraint is bad practice & should be moved somewhere. Bug Tracker =========== @@ -138,7 +149,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -146,36 +157,37 @@ Credits ======= Authors -~~~~~~~ +------- * GRAP * La Louve * LasLabs Contributors -~~~~~~~~~~~~ +------------ -* Sylvain LE GAL (https://twitter.com/legalsylvain) -* Dave Lasley -* `Tecnativa `__: +- Sylvain LE GAL (https://twitter.com/legalsylvain) +- Dave Lasley +- `Tecnativa `__: - * Carlos Roca + - Carlos Roca -* `Ooops404 `__: +- `Ooops404 `__: - * Ilyas + - Ilyas Other credits -~~~~~~~~~~~~~ +------------- Images ~~~~~~ -* Icon 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.html +- Icon 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.html Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -195,6 +207,6 @@ Current `maintainer `__: |maintainer-legalsylvain| -This module is part of the `OCA/stock-logistics-barcode `_ project on GitHub. +This module is part of the `OCA/stock-logistics-barcode `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/barcodes_generator_abstract/models/barcode_rule.py b/barcodes_generator_abstract/models/barcode_rule.py index 56451e6b96e3..74bdf041d4f2 100644 --- a/barcodes_generator_abstract/models/barcode_rule.py +++ b/barcodes_generator_abstract/models/barcode_rule.py @@ -14,7 +14,6 @@ class BarcodeRule(models.Model): - _inherit = "barcode.rule" # Column Section diff --git a/barcodes_generator_abstract/pyproject.toml b/barcodes_generator_abstract/pyproject.toml new file mode 100644 index 000000000000..4231d0cccb3d --- /dev/null +++ b/barcodes_generator_abstract/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/barcodes_generator_abstract/readme/CONFIGURE.md b/barcodes_generator_abstract/readme/CONFIGURE.md new file mode 100644 index 000000000000..6e530fdb103b --- /dev/null +++ b/barcodes_generator_abstract/readme/CONFIGURE.md @@ -0,0 +1,24 @@ +To configure this module, you need to: + +- Go to Settings / Technical / Sequences & Identifiers / Barcode + Nomenclatures +- Select a Nomenclature +- Create or select a rule + +![image](../static/description/barcode_nomenclature_form.png) + +- For manual generation, set: + - 'Base set Manually' in 'Generate Type' + - Set the model + +![image](../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](../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. diff --git a/barcodes_generator_abstract/readme/CONFIGURE.rst b/barcodes_generator_abstract/readme/CONFIGURE.rst deleted file mode 100644 index c7a749ef8a3e..000000000000 --- a/barcodes_generator_abstract/readme/CONFIGURE.rst +++ /dev/null @@ -1,23 +0,0 @@ -To configure this module, you need to: - -* Go to Settings / Technical / Sequences & Identifiers / Barcode Nomenclatures -* Select a Nomenclature -* Create or select a rule - -.. image:: ../static/description/barcode_nomenclature_form.png - -* For manual generation, set: - * 'Base set Manually' in 'Generate Type' - * Set the model - -.. image:: ../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:: ../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. diff --git a/barcodes_generator_abstract/readme/CONTRIBUTORS.md b/barcodes_generator_abstract/readme/CONTRIBUTORS.md new file mode 100644 index 000000000000..ac11b08cbf4d --- /dev/null +++ b/barcodes_generator_abstract/readme/CONTRIBUTORS.md @@ -0,0 +1,6 @@ +- Sylvain LE GAL () +- Dave Lasley \<\> +- [Tecnativa](https://www.tecnativa.com): + - Carlos Roca +- [Ooops404](https://www.ooops404.com): + - Ilyas \<\> diff --git a/barcodes_generator_abstract/readme/CONTRIBUTORS.rst b/barcodes_generator_abstract/readme/CONTRIBUTORS.rst deleted file mode 100644 index 4b79241f742f..000000000000 --- a/barcodes_generator_abstract/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,9 +0,0 @@ -* Sylvain LE GAL (https://twitter.com/legalsylvain) -* Dave Lasley -* `Tecnativa `__: - - * Carlos Roca - -* `Ooops404 `__: - - * Ilyas diff --git a/barcodes_generator_abstract/readme/CREDITS.md b/barcodes_generator_abstract/readme/CREDITS.md new file mode 100644 index 000000000000..cbdb0af03cbe --- /dev/null +++ b/barcodes_generator_abstract/readme/CREDITS.md @@ -0,0 +1,5 @@ +## Images + +- Icon of the module is based on the Oxygen Team work and is under LGPL + licence: + diff --git a/barcodes_generator_abstract/readme/CREDITS.rst b/barcodes_generator_abstract/readme/CREDITS.rst deleted file mode 100644 index 05d406247167..000000000000 --- a/barcodes_generator_abstract/readme/CREDITS.rst +++ /dev/null @@ -1,5 +0,0 @@ -Images -~~~~~~ - -* Icon 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.html diff --git a/barcodes_generator_abstract/readme/DESCRIPTION.md b/barcodes_generator_abstract/readme/DESCRIPTION.md new file mode 100644 index 000000000000..12e4aca68079 --- /dev/null +++ b/barcodes_generator_abstract/readme/DESCRIPTION.md @@ -0,0 +1,23 @@ +This module extends Odoo functionality, allowing user to generate +barcode depending on a given barcode rule for any Model. + +For example, if the barcode pattern is "20.....{NNNDD}": + +- the EAN13 code will begin with '20', +- followed by 5 digits (named *Barcode Base* in this module), +- followed by 5 others digits to define the variable price with 2 + decimals, +- the last digit (the 13rd digit) is the control digit (i.e. the + checksum). + +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). + - automatically by a sequence, if you want to let Odoo increment a + sequence (typical case of a customer number incrementation). + +- Generate a barcode, based on the defined pattern and the barcode base diff --git a/barcodes_generator_abstract/readme/DESCRIPTION.rst b/barcodes_generator_abstract/readme/DESCRIPTION.rst deleted file mode 100644 index 8175f6914ca5..000000000000 --- a/barcodes_generator_abstract/readme/DESCRIPTION.rst +++ /dev/null @@ -1,21 +0,0 @@ -This module extends Odoo functionality, allowing user to generate barcode -depending on a given barcode rule for any Model. - -For example, if the barcode pattern is "20.....{NNNDD}": - -* the EAN13 code will begin with '20', -* followed by 5 digits (named *Barcode Base* in this module), -* followed by 5 others digits to define the variable price with 2 decimals, -* the last digit (the 13rd digit) is the control digit (i.e. the checksum). - -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). - * automatically by a sequence, if you want to let Odoo increment a - sequence (typical case of a customer number incrementation). - -* Generate a barcode, based on the defined pattern and the barcode base diff --git a/barcodes_generator_abstract/readme/INSTALL.md b/barcodes_generator_abstract/readme/INSTALL.md new file mode 100644 index 000000000000..6fdd8771414e --- /dev/null +++ b/barcodes_generator_abstract/readme/INSTALL.md @@ -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` diff --git a/barcodes_generator_abstract/readme/INSTALL.rst b/barcodes_generator_abstract/readme/INSTALL.rst deleted file mode 100644 index 2ce690c2f68e..000000000000 --- a/barcodes_generator_abstract/readme/INSTALL.rst +++ /dev/null @@ -1,4 +0,0 @@ -This module use an extra python library named 'python-barcode' you should install -to make barcode generation works properly. - -``sudo pip install python-barcode`` diff --git a/barcodes_generator_abstract/readme/ROADMAP.md b/barcodes_generator_abstract/readme/ROADMAP.md new file mode 100644 index 000000000000..6c0ab160255d --- /dev/null +++ b/barcodes_generator_abstract/readme/ROADMAP.md @@ -0,0 +1,4 @@ +- On barcode.rule model, constraint and domain system could be set + between 'type' and 'generate_model' fields. +- Cache is being cleared in a constraint in barcode.rule. Mutating in a + constraint is bad practice & should be moved somewhere. diff --git a/barcodes_generator_abstract/readme/ROADMAP.rst b/barcodes_generator_abstract/readme/ROADMAP.rst deleted file mode 100644 index 52df172bd2a2..000000000000 --- a/barcodes_generator_abstract/readme/ROADMAP.rst +++ /dev/null @@ -1,4 +0,0 @@ -* On barcode.rule model, constraint and domain system could be set between - 'type' and 'generate_model' fields. -* Cache is being cleared in a constraint in `barcode.rule`. Mutating in a - constraint is bad practice & should be moved somewhere. diff --git a/barcodes_generator_abstract/readme/USAGE.md b/barcodes_generator_abstract/readme/USAGE.md new file mode 100644 index 000000000000..36e7be48168f --- /dev/null +++ b/barcodes_generator_abstract/readme/USAGE.md @@ -0,0 +1,30 @@ +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. + +If you want to generate barcode for another model, you can create a +custom module that depend 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')]) +``` + +Eventually, you should inherit your model view adding buttons and +fields. + +## Note + +Your model should have a field 'barcode' defined. diff --git a/barcodes_generator_abstract/readme/USAGE.rst b/barcodes_generator_abstract/readme/USAGE.rst deleted file mode 100644 index 0c4d724f55ef..000000000000 --- a/barcodes_generator_abstract/readme/USAGE.rst +++ /dev/null @@ -1,30 +0,0 @@ -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. - -If you want to generate barcode for another model, you can create a custom -module that depend on 'barcodes_generator_abstract' and inherit your model -like that: - -.. code:: - - 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')]) - -Eventually, you should inherit your model view adding buttons and fields. - -Note -~~~~ - -Your model should have a field 'barcode' defined. diff --git a/barcodes_generator_abstract/static/description/index.html b/barcodes_generator_abstract/static/description/index.html index 8cfefe697cd0..b7d9ade72876 100644 --- a/barcodes_generator_abstract/static/description/index.html +++ b/barcodes_generator_abstract/static/description/index.html @@ -369,29 +369,27 @@

Generate Barcodes (Abstract)

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:bf16c95e35d7326ed955b1063c542787110e97a21cf6297c9b1927961d6ab484 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/stock-logistics-barcode Translate me on Weblate Try me on Runboat

-

This module extends Odoo functionality, allowing user to generate barcode -depending on a given barcode rule for any Model.

+

Beta License: AGPL-3 OCA/stock-logistics-barcode Translate me on Weblate Try me on Runboat

+

This module extends Odoo functionality, allowing user to generate +barcode depending on a given barcode rule for any Model.

For example, if the barcode pattern is “20…..{NNNDD}”:

  • the EAN13 code will begin with ‘20’,
  • followed by 5 digits (named Barcode Base in this module),
  • -
  • followed by 5 others digits to define the variable price with 2 decimals,
  • -
  • the last digit (the 13rd digit) is the control digit (i.e. the checksum).
  • +
  • followed by 5 others digits to define the variable price with 2 +decimals,
  • +
  • the last digit (the 13rd digit) is the control digit (i.e. the +checksum).

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).
    • +
    • 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).
      • automatically by a sequence, if you want to let Odoo increment a sequence (typical case of a customer number incrementation).
      -
    -
  • Generate a barcode, based on the defined pattern and the barcode base
@@ -409,8 +407,10 @@

Generate Barcodes (Abstract)

  • Credits
  • @@ -418,60 +418,53 @@

    Generate Barcodes (Abstract)

    Installation

    -

    This module use an extra python library named ‘python-barcode’ you should install -to make barcode generation works properly.

    +

    This module use an extra python library named ‘python-barcode’ you +should install to make barcode generation works properly.

    sudo pip install python-barcode

    Configuration

    To configure this module, you need to:

      -
    • Go to Settings / Technical / Sequences & Identifiers / Barcode Nomenclatures
    • +
    • Go to Settings / Technical / Sequences & Identifiers / Barcode +Nomenclatures
    • Select a Nomenclature
    • Create or select a rule
    -https://raw.githubusercontent.com/OCA/stock-logistics-barcode/16.0/barcodes_generator_abstract/static/description/barcode_nomenclature_form.png +

    image

      -
    • -
      For manual generation, set:
      -
        +
      • For manual generation, set:
        • ‘Base set Manually’ in ‘Generate Type’
        • Set the model
        -
      -
    -https://raw.githubusercontent.com/OCA/stock-logistics-barcode/16.0/barcodes_generator_abstract/static/description/barcode_rule_form_manual.png +

    image1

      -
    • -
      For automatic generation, set:
      -
        +
      • 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
        -
      -
    -https://raw.githubusercontent.com/OCA/stock-logistics-barcode/16.0/barcodes_generator_abstract/static/description/barcode_rule_form_sequence.png +

    image2

    In all cases, padding will be computed automaticaly, based on the number of ‘.’ in the Barcode Pattern field.

    Usage

    -

    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.

    +

    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.

    -

    If you want to generate barcode for another model, you can create a custom -module that depend on ‘barcodes_generator_abstract’ and inherit your model -like that:

    -
    +

    If you want to generate barcode for another model, you can create a +custom module that depend on ‘barcodes_generator_abstract’ and inherit +your model like that:

    +
     class MyModel(models.Model):
         _name = 'my.model'
         _inherit = ['my.model', 'barcode.generate.mixin']
    @@ -481,7 +474,8 @@ 

    Usage

    generate_model = fields.Selection(selection_add=[('my.model', 'My Model')])
    -

    Eventually, you should inherit your model view adding buttons and fields.

    +

    Eventually, you should inherit your model view adding buttons and +fields.

    Note

    Your model should have a field ‘barcode’ defined.

    @@ -490,9 +484,9 @@

    Note

    Known issues / Roadmap

      -
    • On barcode.rule model, constraint and domain system could be set between -‘type’ and ‘generate_model’ fields.
    • -
    • Cache is being cleared in a constraint in barcode.rule. Mutating in a +
    • On barcode.rule model, constraint and domain system could be set +between ‘type’ and ‘generate_model’ fields.
    • +
    • Cache is being cleared in a constraint in barcode.rule. Mutating in a constraint is bad practice & should be moved somewhere.
    @@ -501,7 +495,7 @@

    Bug Tracker

    Bugs are tracked on GitHub 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 welcomed -feedback.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -531,14 +525,15 @@

    Contributors

    -

    Images

    +

    Images

    +

    Maintainers

    This module is maintained by the OCA.

    @@ -548,7 +543,7 @@

    Maintainers

    promote its widespread use.

    Current maintainer:

    legalsylvain

    -

    This module is part of the OCA/stock-logistics-barcode project on GitHub.

    +

    This module is part of the OCA/stock-logistics-barcode project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000000..a79665d79aa5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# generated from manifests external_dependencies +barcode