-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by rousseldenis
- Loading branch information
Showing
29 changed files
with
1,430 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
===================================== | ||
Generate Barcodes for Stock Locations | ||
===================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:6aaeee640999db99f4f6d879b9c42e9626848385af8d2315cff1c6590df316ae | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
: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/17.0/barcodes_generator_location | ||
: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-17-0/stock-logistics-barcode-17-0-barcodes_generator_location | ||
: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=17.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module expands Odoo functionality, allowing user to generate | ||
barcode depending on a given barcode rule for Stock Locations. | ||
|
||
For example, a typical pattern for partners is "042........." that means | ||
that: \* the EAN13 code will begin by '042' \* followed by 0 digits | ||
(named Barcode Base in this module) \* a 13 digit control | ||
|
||
With this module, it is possible to: | ||
|
||
- Assign a pattern (barcode.rule) to a stock.location | ||
|
||
- 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 to increment | ||
a sequence. (typical case of a customer number incrementation) | ||
|
||
- Generate a barcode, based on the defined pattern and the barcode base | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, see the 'Configuration' Section of the | ||
description of the module 'barcodes_generator_abstract' | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
- Go to a Stock Location form | ||
|
||
1 for manual generation | ||
|
||
- Set a Barcode Rule | ||
- Set a Barcode Base | ||
- click on the button 'Generate Barcode (Using Barcode Rule)' | ||
|
||
2 for automatic generation | ||
|
||
- Set a Barcode Rule | ||
- click on the button 'Generate Base (Using Sequence)' | ||
- click on the button 'Generate Barcode (Using Barcode Rule)' | ||
|
||
|image| | ||
|
||
.. |image| image:: https://raw.githubusercontent.com/barcodes_generator/static/description/stock_location_sequence_generation.png | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
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 to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/stock-logistics-barcode/issues/new?body=module:%20barcodes_generator_location%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
------- | ||
|
||
* LasLabs | ||
|
||
Contributors | ||
------------ | ||
|
||
- Dave Lasley <dave@laslabs.com> | ||
- `Tecnativa <https://www.tecnativa.com>`__: | ||
|
||
- David Vidal | ||
- Ernesto Tejeda | ||
|
||
Other credits | ||
------------- | ||
|
||
- 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. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
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 the `OCA/stock-logistics-barcode <https://github.com/OCA/stock-logistics-barcode/tree/17.0/barcodes_generator_location>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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 @@ | ||
from . import models | ||
from .hooks import uninstall_hook |
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,19 @@ | ||
# Copyright 2017 LasLabs Inc. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Generate Barcodes for Stock Locations", | ||
"version": "17.0.1.0.0", | ||
"category": "Tools", | ||
"author": "LasLabs, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/stock-logistics-barcode", | ||
"license": "AGPL-3", | ||
"depends": ["barcodes_generator_abstract", "stock"], | ||
"data": ["views/stock_location.xml"], | ||
"demo": [ | ||
"demo/ir_sequence.xml", | ||
"demo/barcode_rule.xml", | ||
"demo/stock_location.xml", | ||
"demo/function.xml", | ||
], | ||
"uninstall_hook": "uninstall_hook", | ||
} |
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 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
Copyright 2017 LasLabs Inc. | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
--> | ||
<odoo> | ||
<record id="stock_location_generated_barcode" model="barcode.rule"> | ||
<field name="name">Stock Location Rule (Generated Barcode)</field> | ||
<field | ||
name="barcode_nomenclature_id" | ||
ref="barcodes.default_barcode_nomenclature" | ||
/> | ||
<field name="type">location</field> | ||
<field name="sequence">998</field> | ||
<field name="encoding">ean13</field> | ||
<field name="pattern">119.........</field> | ||
<field name="generate_type" eval="'sequence'" /> | ||
<field name="generate_model" eval="'stock.location'" /> | ||
<field name="sequence_id" ref="stock_location_ir_sequence" /> | ||
</record> | ||
</odoo> |
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
Copyright 2017 LasLabs Inc. | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
--> | ||
<odoo> | ||
<function | ||
model="stock.location" | ||
name="generate_base" | ||
eval="[ref('stock_location_barcode')]" | ||
/> | ||
<function | ||
model="stock.location" | ||
name="generate_barcode" | ||
eval="[ref('stock_location_barcode')]" | ||
/> | ||
</odoo> |
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
Copyright 2017 LasLabs Inc. | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
--> | ||
<odoo> | ||
<record id="stock_location_ir_sequence" model="ir.sequence"> | ||
<field name="name">Stock Location Sequence (Generated Barcode)</field> | ||
<field name="padding">10</field> | ||
<field name="number_next">1</field> | ||
</record> | ||
</odoo> |
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
Copyright 2017 LasLabs Inc. | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
--> | ||
<odoo> | ||
<record id="stock_location_barcode" model="stock.location"> | ||
<field name="name">Location with Generated Barcode</field> | ||
<field name="barcode_rule_id" ref="stock_location_generated_barcode" /> | ||
<field name="usage">internal</field> | ||
</record> | ||
</odoo> |
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,13 @@ | ||
# Copyright 2020 Tecnativa - David Vidal | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
|
||
def uninstall_hook(env): | ||
"""Delete barcode rules with generate model `stock.location` as they | ||
won't be useful anymore""" | ||
env.cr.execute( | ||
""" | ||
DELETE FROM barcode_rule | ||
WHERE generate_model = 'stock.location' | ||
""" | ||
) |
82 changes: 82 additions & 0 deletions
82
barcodes_generator_location/i18n/barcodes_generator_location.pot
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,82 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * barcodes_generator_location | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: barcodes_generator_location | ||
#: model:ir.model.fields,help:barcodes_generator_location.field_stock_location__generate_type | ||
msgid "" | ||
"Allow to generate barcode, including a number (a base) in the final barcode.\n" | ||
"\n" | ||
" - 'Base Set Manually' : User should set manually the value of the barcode base\n" | ||
" - 'Base managed by Sequence': System will generate the base via a sequence" | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model_terms:ir.ui.view,arch_db:barcodes_generator_location.view_location_form | ||
msgid "Barcode" | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model:ir.model.fields,field_description:barcodes_generator_location.field_stock_location__barcode_base | ||
msgid "Barcode Base" | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model:ir.model,name:barcodes_generator_location.model_barcode_rule | ||
#: model:ir.model.fields,field_description:barcodes_generator_location.field_stock_location__barcode_rule_id | ||
msgid "Barcode Rule" | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model_terms:ir.ui.view,arch_db:barcodes_generator_location.view_location_form | ||
msgid "Generate Barcode" | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model_terms:ir.ui.view,arch_db:barcodes_generator_location.view_location_form | ||
msgid "Generate Base (Using Sequence)" | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model:ir.model.fields,field_description:barcodes_generator_location.field_barcode_rule__generate_model | ||
msgid "Generate Model" | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model:ir.model.fields,field_description:barcodes_generator_location.field_stock_location__generate_type | ||
msgid "Generate Type" | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model:ir.model.fields,help:barcodes_generator_location.field_barcode_rule__generate_model | ||
msgid "If 'Generate Type' is set, mention the model related to this rule." | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model:ir.model.fields,help:barcodes_generator_location.field_stock_location__barcode_rule_id | ||
msgid "Select a rule to generate a barcode" | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model:ir.model,name:barcodes_generator_location.model_stock_location | ||
#: model:ir.model.fields.selection,name:barcodes_generator_location.selection__barcode_rule__generate_model__stock_location | ||
msgid "Stock Location" | ||
msgstr "" | ||
|
||
#. module: barcodes_generator_location | ||
#: model:ir.model.fields,help:barcodes_generator_location.field_stock_location__barcode_base | ||
msgid "" | ||
"This value is used to generate barcode according to the setting of the " | ||
"barcode rule." | ||
msgstr "" |
Oops, something went wrong.