Skip to content

Commit 169bc77

Browse files
committed
Merge PR #674 into 17.0
Signed-off-by rousseldenis
2 parents 2d401e9 + cbcc798 commit 169bc77

29 files changed

+1430
-0
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
=====================================
2+
Generate Barcodes for Stock Locations
3+
=====================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:6aaeee640999db99f4f6d879b9c42e9626848385af8d2315cff1c6590df316ae
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--barcode-lightgray.png?logo=github
20+
:target: https://github.com/OCA/stock-logistics-barcode/tree/17.0/barcodes_generator_location
21+
:alt: OCA/stock-logistics-barcode
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/stock-logistics-barcode-17-0/stock-logistics-barcode-17-0-barcodes_generator_location
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-barcode&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module expands Odoo functionality, allowing user to generate
32+
barcode depending on a given barcode rule for Stock Locations.
33+
34+
For example, a typical pattern for partners is "042........." that means
35+
that: \* the EAN13 code will begin by '042' \* followed by 0 digits
36+
(named Barcode Base in this module) \* a 13 digit control
37+
38+
With this module, it is possible to:
39+
40+
- Assign a pattern (barcode.rule) to a stock.location
41+
42+
- Define a Barcode base:
43+
44+
- manually, if the base of the barcode must be set by a user.
45+
(typically an internal code defined in your company)
46+
- automatically by a sequence, if you want to let Odoo to increment
47+
a sequence. (typical case of a customer number incrementation)
48+
49+
- Generate a barcode, based on the defined pattern and the barcode base
50+
51+
**Table of contents**
52+
53+
.. contents::
54+
:local:
55+
56+
Configuration
57+
=============
58+
59+
To configure this module, see the 'Configuration' Section of the
60+
description of the module 'barcodes_generator_abstract'
61+
62+
Usage
63+
=====
64+
65+
To use this module, you need to:
66+
67+
- Go to a Stock Location form
68+
69+
1 for manual generation
70+
71+
- Set a Barcode Rule
72+
- Set a Barcode Base
73+
- click on the button 'Generate Barcode (Using Barcode Rule)'
74+
75+
2 for automatic generation
76+
77+
- Set a Barcode Rule
78+
- click on the button 'Generate Base (Using Sequence)'
79+
- click on the button 'Generate Barcode (Using Barcode Rule)'
80+
81+
|image|
82+
83+
.. |image| image:: https://raw.githubusercontent.com/barcodes_generator/static/description/stock_location_sequence_generation.png
84+
85+
Bug Tracker
86+
===========
87+
88+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-barcode/issues>`_.
89+
In case of trouble, please check there if your issue has already been reported.
90+
If you spotted it first, help us to smash it by providing a detailed and welcomed
91+
`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**>`_.
92+
93+
Do not contact contributors directly about support or help with technical issues.
94+
95+
Credits
96+
=======
97+
98+
Authors
99+
-------
100+
101+
* LasLabs
102+
103+
Contributors
104+
------------
105+
106+
- Dave Lasley <[email protected]>
107+
- `Tecnativa <https://www.tecnativa.com>`__:
108+
109+
- David Vidal
110+
- Ernesto Tejeda
111+
112+
Other credits
113+
-------------
114+
115+
- Icon of the module is based on the Oxygen Team work and is under LGPL
116+
licence:
117+
http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org.html
118+
119+
Maintainers
120+
-----------
121+
122+
This module is maintained by the OCA.
123+
124+
.. image:: https://odoo-community.org/logo.png
125+
:alt: Odoo Community Association
126+
:target: https://odoo-community.org
127+
128+
OCA, or the Odoo Community Association, is a nonprofit organization whose
129+
mission is to support the collaborative development of Odoo features and
130+
promote its widespread use.
131+
132+
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.
133+
134+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import models
2+
from .hooks import uninstall_hook
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2017 LasLabs Inc.
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
{
4+
"name": "Generate Barcodes for Stock Locations",
5+
"version": "17.0.1.0.0",
6+
"category": "Tools",
7+
"author": "LasLabs, Odoo Community Association (OCA)",
8+
"website": "https://github.com/OCA/stock-logistics-barcode",
9+
"license": "AGPL-3",
10+
"depends": ["barcodes_generator_abstract", "stock"],
11+
"data": ["views/stock_location.xml"],
12+
"demo": [
13+
"demo/ir_sequence.xml",
14+
"demo/barcode_rule.xml",
15+
"demo/stock_location.xml",
16+
"demo/function.xml",
17+
],
18+
"uninstall_hook": "uninstall_hook",
19+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!--
3+
Copyright 2017 LasLabs Inc.
4+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
5+
-->
6+
<odoo>
7+
<record id="stock_location_generated_barcode" model="barcode.rule">
8+
<field name="name">Stock Location Rule (Generated Barcode)</field>
9+
<field
10+
name="barcode_nomenclature_id"
11+
ref="barcodes.default_barcode_nomenclature"
12+
/>
13+
<field name="type">location</field>
14+
<field name="sequence">998</field>
15+
<field name="encoding">ean13</field>
16+
<field name="pattern">119.........</field>
17+
<field name="generate_type" eval="'sequence'" />
18+
<field name="generate_model" eval="'stock.location'" />
19+
<field name="sequence_id" ref="stock_location_ir_sequence" />
20+
</record>
21+
</odoo>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!--
3+
Copyright 2017 LasLabs Inc.
4+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
5+
-->
6+
<odoo>
7+
<function
8+
model="stock.location"
9+
name="generate_base"
10+
eval="[ref('stock_location_barcode')]"
11+
/>
12+
<function
13+
model="stock.location"
14+
name="generate_barcode"
15+
eval="[ref('stock_location_barcode')]"
16+
/>
17+
</odoo>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!--
3+
Copyright 2017 LasLabs Inc.
4+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
5+
-->
6+
<odoo>
7+
<record id="stock_location_ir_sequence" model="ir.sequence">
8+
<field name="name">Stock Location Sequence (Generated Barcode)</field>
9+
<field name="padding">10</field>
10+
<field name="number_next">1</field>
11+
</record>
12+
</odoo>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!--
3+
Copyright 2017 LasLabs Inc.
4+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
5+
-->
6+
<odoo>
7+
<record id="stock_location_barcode" model="stock.location">
8+
<field name="name">Location with Generated Barcode</field>
9+
<field name="barcode_rule_id" ref="stock_location_generated_barcode" />
10+
<field name="usage">internal</field>
11+
</record>
12+
</odoo>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2020 Tecnativa - David Vidal
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
5+
def uninstall_hook(env):
6+
"""Delete barcode rules with generate model `stock.location` as they
7+
won't be useful anymore"""
8+
env.cr.execute(
9+
"""
10+
DELETE FROM barcode_rule
11+
WHERE generate_model = 'stock.location'
12+
"""
13+
)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * barcodes_generator_location
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: barcodes_generator_location
17+
#: model:ir.model.fields,help:barcodes_generator_location.field_stock_location__generate_type
18+
msgid ""
19+
"Allow to generate barcode, including a number (a base) in the final barcode.\n"
20+
"\n"
21+
" - 'Base Set Manually' : User should set manually the value of the barcode base\n"
22+
" - 'Base managed by Sequence': System will generate the base via a sequence"
23+
msgstr ""
24+
25+
#. module: barcodes_generator_location
26+
#: model_terms:ir.ui.view,arch_db:barcodes_generator_location.view_location_form
27+
msgid "Barcode"
28+
msgstr ""
29+
30+
#. module: barcodes_generator_location
31+
#: model:ir.model.fields,field_description:barcodes_generator_location.field_stock_location__barcode_base
32+
msgid "Barcode Base"
33+
msgstr ""
34+
35+
#. module: barcodes_generator_location
36+
#: model:ir.model,name:barcodes_generator_location.model_barcode_rule
37+
#: model:ir.model.fields,field_description:barcodes_generator_location.field_stock_location__barcode_rule_id
38+
msgid "Barcode Rule"
39+
msgstr ""
40+
41+
#. module: barcodes_generator_location
42+
#: model_terms:ir.ui.view,arch_db:barcodes_generator_location.view_location_form
43+
msgid "Generate Barcode"
44+
msgstr ""
45+
46+
#. module: barcodes_generator_location
47+
#: model_terms:ir.ui.view,arch_db:barcodes_generator_location.view_location_form
48+
msgid "Generate Base (Using Sequence)"
49+
msgstr ""
50+
51+
#. module: barcodes_generator_location
52+
#: model:ir.model.fields,field_description:barcodes_generator_location.field_barcode_rule__generate_model
53+
msgid "Generate Model"
54+
msgstr ""
55+
56+
#. module: barcodes_generator_location
57+
#: model:ir.model.fields,field_description:barcodes_generator_location.field_stock_location__generate_type
58+
msgid "Generate Type"
59+
msgstr ""
60+
61+
#. module: barcodes_generator_location
62+
#: model:ir.model.fields,help:barcodes_generator_location.field_barcode_rule__generate_model
63+
msgid "If 'Generate Type' is set, mention the model related to this rule."
64+
msgstr ""
65+
66+
#. module: barcodes_generator_location
67+
#: model:ir.model.fields,help:barcodes_generator_location.field_stock_location__barcode_rule_id
68+
msgid "Select a rule to generate a barcode"
69+
msgstr ""
70+
71+
#. module: barcodes_generator_location
72+
#: model:ir.model,name:barcodes_generator_location.model_stock_location
73+
#: model:ir.model.fields.selection,name:barcodes_generator_location.selection__barcode_rule__generate_model__stock_location
74+
msgid "Stock Location"
75+
msgstr ""
76+
77+
#. module: barcodes_generator_location
78+
#: model:ir.model.fields,help:barcodes_generator_location.field_stock_location__barcode_base
79+
msgid ""
80+
"This value is used to generate barcode according to the setting of the "
81+
"barcode rule."
82+
msgstr ""

0 commit comments

Comments
 (0)