odoo-addon-barcodes-generator-location 16.0.1.0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/barcodes_generator_location/README.rst +130 -0
- odoo/addons/barcodes_generator_location/__init__.py +2 -0
- odoo/addons/barcodes_generator_location/__manifest__.py +19 -0
- odoo/addons/barcodes_generator_location/demo/barcode_rule.xml +21 -0
- odoo/addons/barcodes_generator_location/demo/function.xml +17 -0
- odoo/addons/barcodes_generator_location/demo/ir_sequence.xml +12 -0
- odoo/addons/barcodes_generator_location/demo/stock_location.xml +12 -0
- odoo/addons/barcodes_generator_location/hooks.py +13 -0
- odoo/addons/barcodes_generator_location/i18n/barcodes_generator_location.pot +82 -0
- odoo/addons/barcodes_generator_location/i18n/es.po +95 -0
- odoo/addons/barcodes_generator_location/i18n/fr.po +95 -0
- odoo/addons/barcodes_generator_location/i18n/hr.po +96 -0
- odoo/addons/barcodes_generator_location/i18n/nl_NL.po +96 -0
- odoo/addons/barcodes_generator_location/models/__init__.py +3 -0
- odoo/addons/barcodes_generator_location/models/barcode_rule.py +11 -0
- odoo/addons/barcodes_generator_location/models/stock_location.py +48 -0
- odoo/addons/barcodes_generator_location/readme/CONFIGURE.rst +2 -0
- odoo/addons/barcodes_generator_location/readme/CONTRIBUTORS.rst +5 -0
- odoo/addons/barcodes_generator_location/readme/CREDITS.rst +2 -0
- odoo/addons/barcodes_generator_location/readme/DESCRIPTION.rst +20 -0
- odoo/addons/barcodes_generator_location/readme/USAGE.rst +15 -0
- odoo/addons/barcodes_generator_location/static/description/icon.png +0 -0
- odoo/addons/barcodes_generator_location/static/description/index.html +487 -0
- odoo/addons/barcodes_generator_location/static/description/stock_location_sequence_generation.png +0 -0
- odoo/addons/barcodes_generator_location/tests/__init__.py +2 -0
- odoo/addons/barcodes_generator_location/tests/test_barcode_generator.py +27 -0
- odoo/addons/barcodes_generator_location/views/stock_location.xml +56 -0
- odoo_addon_barcodes_generator_location-16.0.1.0.0.1.dist-info/METADATA +149 -0
- odoo_addon_barcodes_generator_location-16.0.1.0.0.1.dist-info/RECORD +31 -0
- odoo_addon_barcodes_generator_location-16.0.1.0.0.1.dist-info/WHEEL +5 -0
- odoo_addon_barcodes_generator_location-16.0.1.0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,487 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
7
|
+
<title>Generate Barcodes for Stock Locations</title>
|
8
|
+
<style type="text/css">
|
9
|
+
|
10
|
+
/*
|
11
|
+
:Author: David Goodger (goodger@python.org)
|
12
|
+
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
13
|
+
:Copyright: This stylesheet has been placed in the public domain.
|
14
|
+
|
15
|
+
Default cascading style sheet for the HTML output of Docutils.
|
16
|
+
|
17
|
+
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
18
|
+
customize this style sheet.
|
19
|
+
*/
|
20
|
+
|
21
|
+
/* used to remove borders from tables and images */
|
22
|
+
.borderless, table.borderless td, table.borderless th {
|
23
|
+
border: 0 }
|
24
|
+
|
25
|
+
table.borderless td, table.borderless th {
|
26
|
+
/* Override padding for "table.docutils td" with "! important".
|
27
|
+
The right padding separates the table cells. */
|
28
|
+
padding: 0 0.5em 0 0 ! important }
|
29
|
+
|
30
|
+
.first {
|
31
|
+
/* Override more specific margin styles with "! important". */
|
32
|
+
margin-top: 0 ! important }
|
33
|
+
|
34
|
+
.last, .with-subtitle {
|
35
|
+
margin-bottom: 0 ! important }
|
36
|
+
|
37
|
+
.hidden {
|
38
|
+
display: none }
|
39
|
+
|
40
|
+
.subscript {
|
41
|
+
vertical-align: sub;
|
42
|
+
font-size: smaller }
|
43
|
+
|
44
|
+
.superscript {
|
45
|
+
vertical-align: super;
|
46
|
+
font-size: smaller }
|
47
|
+
|
48
|
+
a.toc-backref {
|
49
|
+
text-decoration: none ;
|
50
|
+
color: black }
|
51
|
+
|
52
|
+
blockquote.epigraph {
|
53
|
+
margin: 2em 5em ; }
|
54
|
+
|
55
|
+
dl.docutils dd {
|
56
|
+
margin-bottom: 0.5em }
|
57
|
+
|
58
|
+
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
59
|
+
overflow: hidden;
|
60
|
+
}
|
61
|
+
|
62
|
+
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
63
|
+
dl.docutils dt {
|
64
|
+
font-weight: bold }
|
65
|
+
*/
|
66
|
+
|
67
|
+
div.abstract {
|
68
|
+
margin: 2em 5em }
|
69
|
+
|
70
|
+
div.abstract p.topic-title {
|
71
|
+
font-weight: bold ;
|
72
|
+
text-align: center }
|
73
|
+
|
74
|
+
div.admonition, div.attention, div.caution, div.danger, div.error,
|
75
|
+
div.hint, div.important, div.note, div.tip, div.warning {
|
76
|
+
margin: 2em ;
|
77
|
+
border: medium outset ;
|
78
|
+
padding: 1em }
|
79
|
+
|
80
|
+
div.admonition p.admonition-title, div.hint p.admonition-title,
|
81
|
+
div.important p.admonition-title, div.note p.admonition-title,
|
82
|
+
div.tip p.admonition-title {
|
83
|
+
font-weight: bold ;
|
84
|
+
font-family: sans-serif }
|
85
|
+
|
86
|
+
div.attention p.admonition-title, div.caution p.admonition-title,
|
87
|
+
div.danger p.admonition-title, div.error p.admonition-title,
|
88
|
+
div.warning p.admonition-title, .code .error {
|
89
|
+
color: red ;
|
90
|
+
font-weight: bold ;
|
91
|
+
font-family: sans-serif }
|
92
|
+
|
93
|
+
/* Uncomment (and remove this text!) to get reduced vertical space in
|
94
|
+
compound paragraphs.
|
95
|
+
div.compound .compound-first, div.compound .compound-middle {
|
96
|
+
margin-bottom: 0.5em }
|
97
|
+
|
98
|
+
div.compound .compound-last, div.compound .compound-middle {
|
99
|
+
margin-top: 0.5em }
|
100
|
+
*/
|
101
|
+
|
102
|
+
div.dedication {
|
103
|
+
margin: 2em 5em ;
|
104
|
+
text-align: center ;
|
105
|
+
font-style: italic }
|
106
|
+
|
107
|
+
div.dedication p.topic-title {
|
108
|
+
font-weight: bold ;
|
109
|
+
font-style: normal }
|
110
|
+
|
111
|
+
div.figure {
|
112
|
+
margin-left: 2em ;
|
113
|
+
margin-right: 2em }
|
114
|
+
|
115
|
+
div.footer, div.header {
|
116
|
+
clear: both;
|
117
|
+
font-size: smaller }
|
118
|
+
|
119
|
+
div.line-block {
|
120
|
+
display: block ;
|
121
|
+
margin-top: 1em ;
|
122
|
+
margin-bottom: 1em }
|
123
|
+
|
124
|
+
div.line-block div.line-block {
|
125
|
+
margin-top: 0 ;
|
126
|
+
margin-bottom: 0 ;
|
127
|
+
margin-left: 1.5em }
|
128
|
+
|
129
|
+
div.sidebar {
|
130
|
+
margin: 0 0 0.5em 1em ;
|
131
|
+
border: medium outset ;
|
132
|
+
padding: 1em ;
|
133
|
+
background-color: #ffffee ;
|
134
|
+
width: 40% ;
|
135
|
+
float: right ;
|
136
|
+
clear: right }
|
137
|
+
|
138
|
+
div.sidebar p.rubric {
|
139
|
+
font-family: sans-serif ;
|
140
|
+
font-size: medium }
|
141
|
+
|
142
|
+
div.system-messages {
|
143
|
+
margin: 5em }
|
144
|
+
|
145
|
+
div.system-messages h1 {
|
146
|
+
color: red }
|
147
|
+
|
148
|
+
div.system-message {
|
149
|
+
border: medium outset ;
|
150
|
+
padding: 1em }
|
151
|
+
|
152
|
+
div.system-message p.system-message-title {
|
153
|
+
color: red ;
|
154
|
+
font-weight: bold }
|
155
|
+
|
156
|
+
div.topic {
|
157
|
+
margin: 2em }
|
158
|
+
|
159
|
+
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
160
|
+
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
161
|
+
margin-top: 0.4em }
|
162
|
+
|
163
|
+
h1.title {
|
164
|
+
text-align: center }
|
165
|
+
|
166
|
+
h2.subtitle {
|
167
|
+
text-align: center }
|
168
|
+
|
169
|
+
hr.docutils {
|
170
|
+
width: 75% }
|
171
|
+
|
172
|
+
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
173
|
+
clear: left ;
|
174
|
+
float: left ;
|
175
|
+
margin-right: 1em }
|
176
|
+
|
177
|
+
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
178
|
+
clear: right ;
|
179
|
+
float: right ;
|
180
|
+
margin-left: 1em }
|
181
|
+
|
182
|
+
img.align-center, .figure.align-center, object.align-center {
|
183
|
+
display: block;
|
184
|
+
margin-left: auto;
|
185
|
+
margin-right: auto;
|
186
|
+
}
|
187
|
+
|
188
|
+
table.align-center {
|
189
|
+
margin-left: auto;
|
190
|
+
margin-right: auto;
|
191
|
+
}
|
192
|
+
|
193
|
+
.align-left {
|
194
|
+
text-align: left }
|
195
|
+
|
196
|
+
.align-center {
|
197
|
+
clear: both ;
|
198
|
+
text-align: center }
|
199
|
+
|
200
|
+
.align-right {
|
201
|
+
text-align: right }
|
202
|
+
|
203
|
+
/* reset inner alignment in figures */
|
204
|
+
div.align-right {
|
205
|
+
text-align: inherit }
|
206
|
+
|
207
|
+
/* div.align-center * { */
|
208
|
+
/* text-align: left } */
|
209
|
+
|
210
|
+
.align-top {
|
211
|
+
vertical-align: top }
|
212
|
+
|
213
|
+
.align-middle {
|
214
|
+
vertical-align: middle }
|
215
|
+
|
216
|
+
.align-bottom {
|
217
|
+
vertical-align: bottom }
|
218
|
+
|
219
|
+
ol.simple, ul.simple {
|
220
|
+
margin-bottom: 1em }
|
221
|
+
|
222
|
+
ol.arabic {
|
223
|
+
list-style: decimal }
|
224
|
+
|
225
|
+
ol.loweralpha {
|
226
|
+
list-style: lower-alpha }
|
227
|
+
|
228
|
+
ol.upperalpha {
|
229
|
+
list-style: upper-alpha }
|
230
|
+
|
231
|
+
ol.lowerroman {
|
232
|
+
list-style: lower-roman }
|
233
|
+
|
234
|
+
ol.upperroman {
|
235
|
+
list-style: upper-roman }
|
236
|
+
|
237
|
+
p.attribution {
|
238
|
+
text-align: right ;
|
239
|
+
margin-left: 50% }
|
240
|
+
|
241
|
+
p.caption {
|
242
|
+
font-style: italic }
|
243
|
+
|
244
|
+
p.credits {
|
245
|
+
font-style: italic ;
|
246
|
+
font-size: smaller }
|
247
|
+
|
248
|
+
p.label {
|
249
|
+
white-space: nowrap }
|
250
|
+
|
251
|
+
p.rubric {
|
252
|
+
font-weight: bold ;
|
253
|
+
font-size: larger ;
|
254
|
+
color: maroon ;
|
255
|
+
text-align: center }
|
256
|
+
|
257
|
+
p.sidebar-title {
|
258
|
+
font-family: sans-serif ;
|
259
|
+
font-weight: bold ;
|
260
|
+
font-size: larger }
|
261
|
+
|
262
|
+
p.sidebar-subtitle {
|
263
|
+
font-family: sans-serif ;
|
264
|
+
font-weight: bold }
|
265
|
+
|
266
|
+
p.topic-title {
|
267
|
+
font-weight: bold }
|
268
|
+
|
269
|
+
pre.address {
|
270
|
+
margin-bottom: 0 ;
|
271
|
+
margin-top: 0 ;
|
272
|
+
font: inherit }
|
273
|
+
|
274
|
+
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
275
|
+
margin-left: 2em ;
|
276
|
+
margin-right: 2em }
|
277
|
+
|
278
|
+
pre.code .ln { color: grey; } /* line numbers */
|
279
|
+
pre.code, code { background-color: #eeeeee }
|
280
|
+
pre.code .comment, code .comment { color: #5C6576 }
|
281
|
+
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
282
|
+
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
283
|
+
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
284
|
+
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
285
|
+
pre.code .inserted, code .inserted { background-color: #A3D289}
|
286
|
+
|
287
|
+
span.classifier {
|
288
|
+
font-family: sans-serif ;
|
289
|
+
font-style: oblique }
|
290
|
+
|
291
|
+
span.classifier-delimiter {
|
292
|
+
font-family: sans-serif ;
|
293
|
+
font-weight: bold }
|
294
|
+
|
295
|
+
span.interpreted {
|
296
|
+
font-family: sans-serif }
|
297
|
+
|
298
|
+
span.option {
|
299
|
+
white-space: nowrap }
|
300
|
+
|
301
|
+
span.pre {
|
302
|
+
white-space: pre }
|
303
|
+
|
304
|
+
span.problematic {
|
305
|
+
color: red }
|
306
|
+
|
307
|
+
span.section-subtitle {
|
308
|
+
/* font-size relative to parent (h1..h6 element) */
|
309
|
+
font-size: 80% }
|
310
|
+
|
311
|
+
table.citation {
|
312
|
+
border-left: solid 1px gray;
|
313
|
+
margin-left: 1px }
|
314
|
+
|
315
|
+
table.docinfo {
|
316
|
+
margin: 2em 4em }
|
317
|
+
|
318
|
+
table.docutils {
|
319
|
+
margin-top: 0.5em ;
|
320
|
+
margin-bottom: 0.5em }
|
321
|
+
|
322
|
+
table.footnote {
|
323
|
+
border-left: solid 1px black;
|
324
|
+
margin-left: 1px }
|
325
|
+
|
326
|
+
table.docutils td, table.docutils th,
|
327
|
+
table.docinfo td, table.docinfo th {
|
328
|
+
padding-left: 0.5em ;
|
329
|
+
padding-right: 0.5em ;
|
330
|
+
vertical-align: top }
|
331
|
+
|
332
|
+
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
333
|
+
font-weight: bold ;
|
334
|
+
text-align: left ;
|
335
|
+
white-space: nowrap ;
|
336
|
+
padding-left: 0 }
|
337
|
+
|
338
|
+
/* "booktabs" style (no vertical lines) */
|
339
|
+
table.docutils.booktabs {
|
340
|
+
border: 0px;
|
341
|
+
border-top: 2px solid;
|
342
|
+
border-bottom: 2px solid;
|
343
|
+
border-collapse: collapse;
|
344
|
+
}
|
345
|
+
table.docutils.booktabs * {
|
346
|
+
border: 0px;
|
347
|
+
}
|
348
|
+
table.docutils.booktabs th {
|
349
|
+
border-bottom: thin solid;
|
350
|
+
text-align: left;
|
351
|
+
}
|
352
|
+
|
353
|
+
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
354
|
+
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
355
|
+
font-size: 100% }
|
356
|
+
|
357
|
+
ul.auto-toc {
|
358
|
+
list-style-type: none }
|
359
|
+
|
360
|
+
</style>
|
361
|
+
</head>
|
362
|
+
<body>
|
363
|
+
<div class="document" id="generate-barcodes-for-stock-locations">
|
364
|
+
<h1 class="title">Generate Barcodes for Stock Locations</h1>
|
365
|
+
|
366
|
+
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
367
|
+
!! This file is generated by oca-gen-addon-readme !!
|
368
|
+
!! changes will be overwritten. !!
|
369
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
370
|
+
!! source digest: sha256:6aaeee640999db99f4f6d879b9c42e9626848385af8d2315cff1c6590df316ae
|
371
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
372
|
+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-barcode/tree/16.0/barcodes_generator_location"><img alt="OCA/stock-logistics-barcode" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--barcode-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-barcode-16-0/stock-logistics-barcode-16-0-barcodes_generator_location"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-barcode&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
373
|
+
<p>This module expands Odoo functionality, allowing user to generate barcode
|
374
|
+
depending on a given barcode rule for Stock Locations.</p>
|
375
|
+
<p>For example, a typical pattern for partners is “042………” that means
|
376
|
+
that:
|
377
|
+
* the EAN13 code will begin by ‘042’
|
378
|
+
* followed by 0 digits (named Barcode Base in this module)
|
379
|
+
* a 13 digit control</p>
|
380
|
+
<p>With this module, it is possible to:</p>
|
381
|
+
<ul class="simple">
|
382
|
+
<li>Assign a pattern (barcode.rule) to a stock.location</li>
|
383
|
+
<li><dl class="first docutils">
|
384
|
+
<dt>Define a Barcode base:</dt>
|
385
|
+
<dd><ul class="first last">
|
386
|
+
<li>manually, if the base of the barcode must be set by a user. (typically an
|
387
|
+
internal code defined in your company)</li>
|
388
|
+
<li>automatically by a sequence, if you want to let Odoo to increment a
|
389
|
+
sequence. (typical case of a customer number incrementation)</li>
|
390
|
+
</ul>
|
391
|
+
</dd>
|
392
|
+
</dl>
|
393
|
+
</li>
|
394
|
+
<li>Generate a barcode, based on the defined pattern and the barcode base</li>
|
395
|
+
</ul>
|
396
|
+
<p><strong>Table of contents</strong></p>
|
397
|
+
<div class="contents local topic" id="contents">
|
398
|
+
<ul class="simple">
|
399
|
+
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
|
400
|
+
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li>
|
401
|
+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
402
|
+
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
403
|
+
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
404
|
+
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
405
|
+
<li><a class="reference internal" href="#other-credits" id="toc-entry-7">Other credits</a></li>
|
406
|
+
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
|
407
|
+
</ul>
|
408
|
+
</li>
|
409
|
+
</ul>
|
410
|
+
</div>
|
411
|
+
<div class="section" id="configuration">
|
412
|
+
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
413
|
+
<p>To configure this module, see the ‘Configuration’ Section of the description
|
414
|
+
of the module ‘barcodes_generator_abstract’</p>
|
415
|
+
</div>
|
416
|
+
<div class="section" id="usage">
|
417
|
+
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
|
418
|
+
<p>To use this module, you need to:</p>
|
419
|
+
<ul class="simple">
|
420
|
+
<li>Go to a Stock Location form</li>
|
421
|
+
</ul>
|
422
|
+
<dl class="docutils">
|
423
|
+
<dt>1 for manual generation</dt>
|
424
|
+
<dd><ul class="first last simple">
|
425
|
+
<li>Set a Barcode Rule</li>
|
426
|
+
<li>Set a Barcode Base</li>
|
427
|
+
<li>click on the button ‘Generate Barcode (Using Barcode Rule)’</li>
|
428
|
+
</ul>
|
429
|
+
</dd>
|
430
|
+
<dt>2 for automatic generation</dt>
|
431
|
+
<dd><ul class="first last simple">
|
432
|
+
<li>Set a Barcode Rule</li>
|
433
|
+
<li>click on the button ‘Generate Base (Using Sequence)’</li>
|
434
|
+
<li>click on the button ‘Generate Barcode (Using Barcode Rule)’</li>
|
435
|
+
</ul>
|
436
|
+
</dd>
|
437
|
+
</dl>
|
438
|
+
<img alt="https://raw.githubusercontent.com/barcodes_generator/static/description/stock_location_sequence_generation.png" src="https://raw.githubusercontent.com/barcodes_generator/static/description/stock_location_sequence_generation.png" />
|
439
|
+
</div>
|
440
|
+
<div class="section" id="bug-tracker">
|
441
|
+
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
|
442
|
+
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-barcode/issues">GitHub Issues</a>.
|
443
|
+
In case of trouble, please check there if your issue has already been reported.
|
444
|
+
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
445
|
+
<a class="reference external" href="https://github.com/OCA/stock-logistics-barcode/issues/new?body=module:%20barcodes_generator_location%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
446
|
+
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
447
|
+
</div>
|
448
|
+
<div class="section" id="credits">
|
449
|
+
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
|
450
|
+
<div class="section" id="authors">
|
451
|
+
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
|
452
|
+
<ul class="simple">
|
453
|
+
<li>LasLabs</li>
|
454
|
+
</ul>
|
455
|
+
</div>
|
456
|
+
<div class="section" id="contributors">
|
457
|
+
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
|
458
|
+
<ul class="simple">
|
459
|
+
<li>Dave Lasley <<a class="reference external" href="mailto:dave@laslabs.com">dave@laslabs.com</a>></li>
|
460
|
+
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
461
|
+
<li>David Vidal</li>
|
462
|
+
<li>Ernesto Tejeda</li>
|
463
|
+
</ul>
|
464
|
+
</li>
|
465
|
+
</ul>
|
466
|
+
</div>
|
467
|
+
<div class="section" id="other-credits">
|
468
|
+
<h2><a class="toc-backref" href="#toc-entry-7">Other credits</a></h2>
|
469
|
+
<ul class="simple">
|
470
|
+
<li>Icon of the module is based on the Oxygen Team work and is under LGPL licence:
|
471
|
+
<a class="reference external" href="http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org.html">http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org.html</a></li>
|
472
|
+
</ul>
|
473
|
+
</div>
|
474
|
+
<div class="section" id="maintainers">
|
475
|
+
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
|
476
|
+
<p>This module is maintained by the OCA.</p>
|
477
|
+
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
478
|
+
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
479
|
+
mission is to support the collaborative development of Odoo features and
|
480
|
+
promote its widespread use.</p>
|
481
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-barcode/tree/16.0/barcodes_generator_location">OCA/stock-logistics-barcode</a> project on GitHub.</p>
|
482
|
+
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
483
|
+
</div>
|
484
|
+
</div>
|
485
|
+
</div>
|
486
|
+
</body>
|
487
|
+
</html>
|
odoo/addons/barcodes_generator_location/static/description/stock_location_sequence_generation.png
ADDED
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Copyright 2017 LasLabs Inc.
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
3
|
+
from odoo.tests.common import TransactionCase
|
4
|
+
|
5
|
+
|
6
|
+
class TestBarcodeGenerator(TransactionCase):
|
7
|
+
@classmethod
|
8
|
+
def setUpClass(cls):
|
9
|
+
super().setUpClass()
|
10
|
+
cls.record = cls.env.ref(
|
11
|
+
"barcodes_generator_location.stock_location_barcode",
|
12
|
+
)
|
13
|
+
cls.record.generate_barcode()
|
14
|
+
|
15
|
+
def test_generate_base(self):
|
16
|
+
"""It should generate the correct base for the barcode."""
|
17
|
+
self.assertEqual(
|
18
|
+
self.record.barcode_base,
|
19
|
+
1,
|
20
|
+
)
|
21
|
+
|
22
|
+
def test_generate_sequence(self):
|
23
|
+
"""It should generate the correct sequence for the barcode."""
|
24
|
+
self.assertEqual(
|
25
|
+
self.record.barcode,
|
26
|
+
"1190000000014",
|
27
|
+
)
|
@@ -0,0 +1,56 @@
|
|
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="view_location_form" model="ir.ui.view">
|
8
|
+
<field name="model">stock.location</field>
|
9
|
+
<field name="inherit_id" ref="stock.view_location_form" />
|
10
|
+
<field name="arch" type="xml">
|
11
|
+
<group name="additional_info" position="after">
|
12
|
+
<!-- This view is handled by fields_view_get method of
|
13
|
+
stock location to add the barcode field to the view
|
14
|
+
in case it has not been added by the stock_barcodes
|
15
|
+
module. -->
|
16
|
+
<group name="barcodes_generator_location" string="Barcode">
|
17
|
+
<field
|
18
|
+
name="barcode_rule_id"
|
19
|
+
domain="[('generate_model', '=', 'stock.location')]"
|
20
|
+
groups="barcodes_generator_abstract.generate_barcode"
|
21
|
+
/>
|
22
|
+
<field name="generate_type" invisible="1" />
|
23
|
+
<field
|
24
|
+
name="barcode_base"
|
25
|
+
attrs="{
|
26
|
+
'invisible': [('barcode_rule_id', '=', False)],
|
27
|
+
'readonly': [('generate_type', '!=', 'manual')],
|
28
|
+
}"
|
29
|
+
groups="barcodes_generator_abstract.generate_barcode"
|
30
|
+
/>
|
31
|
+
<button
|
32
|
+
name="generate_base"
|
33
|
+
type="object"
|
34
|
+
string="Generate Base (Using Sequence)"
|
35
|
+
attrs="{'invisible': ['|',
|
36
|
+
('generate_type', '!=', 'sequence'),
|
37
|
+
('barcode_base', '!=', 0),
|
38
|
+
]}"
|
39
|
+
groups="barcodes_generator_abstract.generate_barcode"
|
40
|
+
/>
|
41
|
+
<button
|
42
|
+
name="generate_barcode"
|
43
|
+
type="object"
|
44
|
+
string="Generate Barcode"
|
45
|
+
attrs="{'invisible': ['|',
|
46
|
+
('barcode_rule_id', '=', False),
|
47
|
+
('barcode_base', '=', 0),
|
48
|
+
]}"
|
49
|
+
groups="barcodes_generator_abstract.generate_barcode"
|
50
|
+
colspan="2"
|
51
|
+
/>
|
52
|
+
</group>
|
53
|
+
</group>
|
54
|
+
</field>
|
55
|
+
</record>
|
56
|
+
</odoo>
|