odoo-addon-shopfloor-mobile 16.0.1.0.0.6__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/shopfloor_mobile/README.rst +215 -0
- odoo/addons/shopfloor_mobile/__init__.py +0 -0
- odoo/addons/shopfloor_mobile/__manifest__.py +17 -0
- odoo/addons/shopfloor_mobile/i18n/es_AR.po +39 -0
- odoo/addons/shopfloor_mobile/i18n/pt_BR.po +14 -0
- odoo/addons/shopfloor_mobile/i18n/shopfloor_mobile.pot +13 -0
- odoo/addons/shopfloor_mobile/readme/CONTRIBUTORS.rst +12 -0
- odoo/addons/shopfloor_mobile/readme/CREDITS.rst +5 -0
- odoo/addons/shopfloor_mobile/readme/DESCRIPTION.rst +31 -0
- odoo/addons/shopfloor_mobile/readme/HISTORY.rst +4 -0
- odoo/addons/shopfloor_mobile/readme/ROADMAP.rst +29 -0
- odoo/addons/shopfloor_mobile/readme/USAGE.rst +34 -0
- odoo/addons/shopfloor_mobile/static/description/icon.png +0 -0
- odoo/addons/shopfloor_mobile/static/description/index.html +555 -0
- odoo/addons/shopfloor_mobile/static/wms/.gitignore +21 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/batch_picking_detail.js +69 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/batch_picking_line_detail.js +141 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/detail/detail_location.js +66 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/detail/detail_lot.js +91 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/detail/detail_operation.js +50 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/detail/detail_package.js +73 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/detail/detail_picking.js +40 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/detail/detail_product.js +70 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/detail/detail_transfer.js +128 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/forms/form_edit_stock_picking.js +39 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/manual_select_color.js +24 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/misc.js +201 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/packaging-qty-picker.js +329 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/scenario_picking_detail/mixins.js +130 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/scenario_picking_detail/picking_select.js +135 -0
- odoo/addons/shopfloor_mobile/static/wms/src/components/scenario_picking_detail/picking_summary.js +212 -0
- odoo/addons/shopfloor_mobile/static/wms/src/css/main.css +73 -0
- odoo/addons/shopfloor_mobile/static/wms/src/css/normalize.css +351 -0
- odoo/addons/shopfloor_mobile/static/wms/src/demo/demo.checkout.js +257 -0
- odoo/addons/shopfloor_mobile/static/wms/src/demo/demo.cluster_picking.js +188 -0
- odoo/addons/shopfloor_mobile/static/wms/src/demo/demo.delivery.js +79 -0
- odoo/addons/shopfloor_mobile/static/wms/src/demo/demo.location_content_transfer.js +179 -0
- odoo/addons/shopfloor_mobile/static/wms/src/demo/demo.scan_anything.js +124 -0
- odoo/addons/shopfloor_mobile/static/wms/src/demo/demo.single_pack_transfer.js +83 -0
- odoo/addons/shopfloor_mobile/static/wms/src/demo/demo.zone_picking.js +277 -0
- odoo/addons/shopfloor_mobile/static/wms/src/i18n/add_translations_to_registry.js +4 -0
- odoo/addons/shopfloor_mobile/static/wms/src/i18n/en.json +31 -0
- odoo/addons/shopfloor_mobile/static/wms/src/i18n/fr.json +27 -0
- odoo/addons/shopfloor_mobile/static/wms/src/scenario/checkout.js +390 -0
- odoo/addons/shopfloor_mobile/static/wms/src/scenario/checkout_states.js +380 -0
- odoo/addons/shopfloor_mobile/static/wms/src/scenario/cluster_picking.js +481 -0
- odoo/addons/shopfloor_mobile/static/wms/src/scenario/delivery.js +353 -0
- odoo/addons/shopfloor_mobile/static/wms/src/scenario/location_content_transfer.js +388 -0
- odoo/addons/shopfloor_mobile/static/wms/src/scenario/single_pack_transfer.js +132 -0
- odoo/addons/shopfloor_mobile/static/wms/src/scenario/zone_picking.js +838 -0
- odoo/addons/shopfloor_mobile/static/wms/src/screen.js +36 -0
- odoo/addons/shopfloor_mobile/static/wms/src/wms_utils.js +318 -0
- odoo/addons/shopfloor_mobile/templates/assets.xml +180 -0
- odoo_addon_shopfloor_mobile-16.0.1.0.0.6.dist-info/METADATA +235 -0
- odoo_addon_shopfloor_mobile-16.0.1.0.0.6.dist-info/RECORD +57 -0
- odoo_addon_shopfloor_mobile-16.0.1.0.0.6.dist-info/WHEEL +5 -0
- odoo_addon_shopfloor_mobile-16.0.1.0.0.6.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
|
2
|
+
|
|
3
|
+
/* Document
|
|
4
|
+
========================================================================== */
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 1. Correct the line height in all browsers.
|
|
8
|
+
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
html {
|
|
12
|
+
line-height: 1.15; /* 1 */
|
|
13
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Sections
|
|
17
|
+
========================================================================== */
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Remove the margin in all browsers.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
body {
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Render the `main` element consistently in IE.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
main {
|
|
32
|
+
display: block;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Correct the font size and margin on `h1` elements within `section` and
|
|
37
|
+
* `article` contexts in Chrome, Firefox, and Safari.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
h1 {
|
|
41
|
+
font-size: 2em;
|
|
42
|
+
margin: 0.67em 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Grouping content
|
|
46
|
+
========================================================================== */
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 1. Add the correct box sizing in Firefox.
|
|
50
|
+
* 2. Show the overflow in Edge and IE.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
hr {
|
|
54
|
+
box-sizing: content-box; /* 1 */
|
|
55
|
+
height: 0; /* 1 */
|
|
56
|
+
overflow: visible; /* 2 */
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
61
|
+
* 2. Correct the odd `em` font sizing in all browsers.
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
pre {
|
|
65
|
+
font-family: monospace, monospace; /* 1 */
|
|
66
|
+
font-size: 1em; /* 2 */
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Text-level semantics
|
|
70
|
+
========================================================================== */
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Remove the gray background on active links in IE 10.
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
a {
|
|
77
|
+
background-color: transparent;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 1. Remove the bottom border in Chrome 57-
|
|
82
|
+
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
abbr[title] {
|
|
86
|
+
border-bottom: none; /* 1 */
|
|
87
|
+
text-decoration: underline; /* 2 */
|
|
88
|
+
text-decoration: underline dotted; /* 2 */
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Add the correct font weight in Chrome, Edge, and Safari.
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
b,
|
|
96
|
+
strong {
|
|
97
|
+
font-weight: bolder;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
102
|
+
* 2. Correct the odd `em` font sizing in all browsers.
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
code,
|
|
106
|
+
kbd,
|
|
107
|
+
samp {
|
|
108
|
+
font-family: monospace, monospace; /* 1 */
|
|
109
|
+
font-size: 1em; /* 2 */
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Add the correct font size in all browsers.
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
small {
|
|
117
|
+
font-size: 80%;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Prevent `sub` and `sup` elements from affecting the line height in
|
|
122
|
+
* all browsers.
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
sub,
|
|
126
|
+
sup {
|
|
127
|
+
font-size: 75%;
|
|
128
|
+
line-height: 0;
|
|
129
|
+
position: relative;
|
|
130
|
+
vertical-align: baseline;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
sub {
|
|
134
|
+
bottom: -0.25em;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
sup {
|
|
138
|
+
top: -0.5em;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Embedded content
|
|
142
|
+
========================================================================== */
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Remove the border on images inside links in IE 10.
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
img {
|
|
149
|
+
border-style: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Forms
|
|
153
|
+
========================================================================== */
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* 1. Change the font styles in all browsers.
|
|
157
|
+
* 2. Remove the margin in Firefox and Safari.
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
button,
|
|
161
|
+
input,
|
|
162
|
+
optgroup,
|
|
163
|
+
select,
|
|
164
|
+
textarea {
|
|
165
|
+
font-family: inherit; /* 1 */
|
|
166
|
+
font-size: 100%; /* 1 */
|
|
167
|
+
line-height: 1.15; /* 1 */
|
|
168
|
+
margin: 0; /* 2 */
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Show the overflow in IE.
|
|
173
|
+
* 1. Show the overflow in Edge.
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
button,
|
|
177
|
+
input {
|
|
178
|
+
/* 1 */
|
|
179
|
+
overflow: visible;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
|
184
|
+
* 1. Remove the inheritance of text transform in Firefox.
|
|
185
|
+
*/
|
|
186
|
+
|
|
187
|
+
button,
|
|
188
|
+
select {
|
|
189
|
+
/* 1 */
|
|
190
|
+
text-transform: none;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Correct the inability to style clickable types in iOS and Safari.
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
button,
|
|
198
|
+
[type="button"],
|
|
199
|
+
[type="reset"],
|
|
200
|
+
[type="submit"] {
|
|
201
|
+
-webkit-appearance: button;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Remove the inner border and padding in Firefox.
|
|
206
|
+
*/
|
|
207
|
+
|
|
208
|
+
button::-moz-focus-inner,
|
|
209
|
+
[type="button"]::-moz-focus-inner,
|
|
210
|
+
[type="reset"]::-moz-focus-inner,
|
|
211
|
+
[type="submit"]::-moz-focus-inner {
|
|
212
|
+
border-style: none;
|
|
213
|
+
padding: 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Restore the focus styles unset by the previous rule.
|
|
218
|
+
*/
|
|
219
|
+
|
|
220
|
+
button:-moz-focusring,
|
|
221
|
+
[type="button"]:-moz-focusring,
|
|
222
|
+
[type="reset"]:-moz-focusring,
|
|
223
|
+
[type="submit"]:-moz-focusring {
|
|
224
|
+
outline: 1px dotted ButtonText;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Correct the padding in Firefox.
|
|
229
|
+
*/
|
|
230
|
+
|
|
231
|
+
fieldset {
|
|
232
|
+
padding: 0.35em 0.75em 0.625em;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* 1. Correct the text wrapping in Edge and IE.
|
|
237
|
+
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
|
238
|
+
* 3. Remove the padding so developers are not caught out when they zero out
|
|
239
|
+
* `fieldset` elements in all browsers.
|
|
240
|
+
*/
|
|
241
|
+
|
|
242
|
+
legend {
|
|
243
|
+
box-sizing: border-box; /* 1 */
|
|
244
|
+
color: inherit; /* 2 */
|
|
245
|
+
display: table; /* 1 */
|
|
246
|
+
max-width: 100%; /* 1 */
|
|
247
|
+
padding: 0; /* 3 */
|
|
248
|
+
white-space: normal; /* 1 */
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
|
253
|
+
*/
|
|
254
|
+
|
|
255
|
+
progress {
|
|
256
|
+
vertical-align: baseline;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Remove the default vertical scrollbar in IE 10+.
|
|
261
|
+
*/
|
|
262
|
+
|
|
263
|
+
textarea {
|
|
264
|
+
overflow: auto;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* 1. Add the correct box sizing in IE 10.
|
|
269
|
+
* 2. Remove the padding in IE 10.
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
[type="checkbox"],
|
|
273
|
+
[type="radio"] {
|
|
274
|
+
box-sizing: border-box; /* 1 */
|
|
275
|
+
padding: 0; /* 2 */
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Correct the cursor style of increment and decrement buttons in Chrome.
|
|
280
|
+
*/
|
|
281
|
+
|
|
282
|
+
[type="number"]::-webkit-inner-spin-button,
|
|
283
|
+
[type="number"]::-webkit-outer-spin-button {
|
|
284
|
+
height: auto;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* 1. Correct the odd appearance in Chrome and Safari.
|
|
289
|
+
* 2. Correct the outline style in Safari.
|
|
290
|
+
*/
|
|
291
|
+
|
|
292
|
+
[type="search"] {
|
|
293
|
+
-webkit-appearance: textfield; /* 1 */
|
|
294
|
+
outline-offset: -2px; /* 2 */
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Remove the inner padding in Chrome and Safari on macOS.
|
|
299
|
+
*/
|
|
300
|
+
|
|
301
|
+
[type="search"]::-webkit-search-decoration {
|
|
302
|
+
-webkit-appearance: none;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* 1. Correct the inability to style clickable types in iOS and Safari.
|
|
307
|
+
* 2. Change font properties to `inherit` in Safari.
|
|
308
|
+
*/
|
|
309
|
+
|
|
310
|
+
::-webkit-file-upload-button {
|
|
311
|
+
-webkit-appearance: button; /* 1 */
|
|
312
|
+
font: inherit; /* 2 */
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* Interactive
|
|
316
|
+
========================================================================== */
|
|
317
|
+
|
|
318
|
+
/*
|
|
319
|
+
* Add the correct display in Edge, IE 10+, and Firefox.
|
|
320
|
+
*/
|
|
321
|
+
|
|
322
|
+
details {
|
|
323
|
+
display: block;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/*
|
|
327
|
+
* Add the correct display in all browsers.
|
|
328
|
+
*/
|
|
329
|
+
|
|
330
|
+
summary {
|
|
331
|
+
display: list-item;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/* Misc
|
|
335
|
+
========================================================================== */
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Add the correct display in IE 10+.
|
|
339
|
+
*/
|
|
340
|
+
|
|
341
|
+
template {
|
|
342
|
+
display: none;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Add the correct display in IE 10.
|
|
347
|
+
*/
|
|
348
|
+
|
|
349
|
+
[hidden] {
|
|
350
|
+
display: none;
|
|
351
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020 Camptocamp SA (http://www.camptocamp.com)
|
|
3
|
+
* @author Simone Orsi <simahawk@gmail.com>
|
|
4
|
+
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import {demotools} from "/shopfloor_mobile_base/static/wms/src/demo/demo.core.js";
|
|
8
|
+
|
|
9
|
+
const select_pack_picking = demotools.makePicking(
|
|
10
|
+
{},
|
|
11
|
+
{lines_count: 5, line_random_pack: true, line_random_dest: true}
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
const move_lines1 = demotools.makePickingLines(
|
|
15
|
+
{},
|
|
16
|
+
{lines_count: 5, line_random_pack: true}
|
|
17
|
+
);
|
|
18
|
+
const select_line_picking = demotools.makePicking(
|
|
19
|
+
{
|
|
20
|
+
move_lines: move_lines1,
|
|
21
|
+
},
|
|
22
|
+
{no_lines: true}
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const move_lines2 = demotools.makePickingLines(
|
|
26
|
+
{},
|
|
27
|
+
{lines_count: 5, line_random_pack: true}
|
|
28
|
+
);
|
|
29
|
+
const summary_picking = demotools.makePicking(
|
|
30
|
+
{
|
|
31
|
+
move_lines: move_lines2,
|
|
32
|
+
},
|
|
33
|
+
{no_lines: true}
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const data_for_select_package = {
|
|
37
|
+
next_state: "select_package",
|
|
38
|
+
data: {
|
|
39
|
+
select_package: {
|
|
40
|
+
picking: select_pack_picking,
|
|
41
|
+
selected_move_lines: select_pack_picking.move_lines,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const data_for_set_line_qty = _.cloneDeep(data_for_select_package);
|
|
47
|
+
|
|
48
|
+
const DEMO_CHECKOUT = {
|
|
49
|
+
scan_document: {
|
|
50
|
+
PACK1: {
|
|
51
|
+
// No picking
|
|
52
|
+
next_state: "select_document",
|
|
53
|
+
message: {
|
|
54
|
+
message_type: "error",
|
|
55
|
+
body: "No picking found for PACK1",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
PACK2: {
|
|
59
|
+
// All line have a destination pack
|
|
60
|
+
next_state: "select_line",
|
|
61
|
+
data: {
|
|
62
|
+
select_line: {picking: select_line_picking},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
select: {
|
|
67
|
+
next_state: "select_line",
|
|
68
|
+
data: {
|
|
69
|
+
select_line: {picking: select_line_picking},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
scan_package_action: function (data) {
|
|
73
|
+
const res = data_for_select_package;
|
|
74
|
+
const line = res.data.select_package.selected_move_lines.find(function (x) {
|
|
75
|
+
return x.product.barcode == data.barcode;
|
|
76
|
+
});
|
|
77
|
+
line.qty_done++;
|
|
78
|
+
return res;
|
|
79
|
+
},
|
|
80
|
+
list_stock_picking: {
|
|
81
|
+
next_state: "manual_selection",
|
|
82
|
+
message: null,
|
|
83
|
+
data: {
|
|
84
|
+
manual_selection: {
|
|
85
|
+
pickings: _.sampleSize(
|
|
86
|
+
[
|
|
87
|
+
demotools.makePicking(),
|
|
88
|
+
demotools.makePicking(),
|
|
89
|
+
demotools.makePicking(),
|
|
90
|
+
demotools.makePicking(),
|
|
91
|
+
demotools.makePicking(),
|
|
92
|
+
demotools.makePicking(),
|
|
93
|
+
demotools.makePicking(),
|
|
94
|
+
demotools.makePicking(),
|
|
95
|
+
],
|
|
96
|
+
_.random(8)
|
|
97
|
+
),
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
select_line: data_for_select_package,
|
|
102
|
+
set_line_qty: function (data) {
|
|
103
|
+
const res = data_for_set_line_qty;
|
|
104
|
+
const line = res.data.select_package.selected_move_lines.filter(function (x) {
|
|
105
|
+
return x.id == data.move_line_id;
|
|
106
|
+
})[0];
|
|
107
|
+
line.qty_done = line.quantity;
|
|
108
|
+
return res;
|
|
109
|
+
},
|
|
110
|
+
reset_line_qty: function (data) {
|
|
111
|
+
const res = data_for_set_line_qty;
|
|
112
|
+
const line = res.data.select_package.selected_move_lines.filter(function (x) {
|
|
113
|
+
return x.id == data.move_line_id;
|
|
114
|
+
})[0];
|
|
115
|
+
line.qty_done = 0;
|
|
116
|
+
return res;
|
|
117
|
+
},
|
|
118
|
+
list_dest_package: {
|
|
119
|
+
next_state: "select_dest_package",
|
|
120
|
+
data: {
|
|
121
|
+
select_dest_package: {
|
|
122
|
+
picking: select_pack_picking,
|
|
123
|
+
packages: _.sampleSize(
|
|
124
|
+
[
|
|
125
|
+
demotools.makePack(),
|
|
126
|
+
demotools.makePack(),
|
|
127
|
+
demotools.makePack(),
|
|
128
|
+
demotools.makePack(),
|
|
129
|
+
demotools.makePack(),
|
|
130
|
+
demotools.makePack(),
|
|
131
|
+
demotools.makePack(),
|
|
132
|
+
demotools.makePack(),
|
|
133
|
+
],
|
|
134
|
+
_.random(8)
|
|
135
|
+
),
|
|
136
|
+
// Simulate unselecting 1 line
|
|
137
|
+
selected_move_lines: select_pack_picking.move_lines,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
set_dest_package: {
|
|
142
|
+
next_state: "select_line",
|
|
143
|
+
data: {
|
|
144
|
+
select_line: {picking: select_line_picking},
|
|
145
|
+
},
|
|
146
|
+
message: {
|
|
147
|
+
message_type: "info",
|
|
148
|
+
body: "Goods packed in XYZ",
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
scan_dest_package: {
|
|
152
|
+
next_state: "select_line",
|
|
153
|
+
data: {
|
|
154
|
+
select_line: {picking: select_line_picking},
|
|
155
|
+
},
|
|
156
|
+
message: {
|
|
157
|
+
message_type: "info",
|
|
158
|
+
body: "Goods packed in XYZ",
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
new_package: {
|
|
162
|
+
next_state: "select_line",
|
|
163
|
+
data: {
|
|
164
|
+
select_line: {picking: select_line_picking},
|
|
165
|
+
},
|
|
166
|
+
message: {
|
|
167
|
+
message_type: "info",
|
|
168
|
+
body: "Goods packed in XYZ",
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
no_package: {
|
|
172
|
+
next_state: "select_line",
|
|
173
|
+
data: {
|
|
174
|
+
select_line: {picking: select_line_picking},
|
|
175
|
+
},
|
|
176
|
+
message: {
|
|
177
|
+
message_type: "info",
|
|
178
|
+
body: "Goods packed in XYZ",
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
summary: {
|
|
182
|
+
next_state: "summary",
|
|
183
|
+
data: {
|
|
184
|
+
summary: {picking: summary_picking},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
remove_package: {
|
|
188
|
+
next_state: "summary",
|
|
189
|
+
data: {
|
|
190
|
+
summary: {picking: summary_picking},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
done: {
|
|
194
|
+
next_state: "select_document",
|
|
195
|
+
message: {
|
|
196
|
+
message_type: "info",
|
|
197
|
+
body: "Done",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
list_packaging: {
|
|
201
|
+
next_state: "change_packaging",
|
|
202
|
+
data: {
|
|
203
|
+
change_packaging: {
|
|
204
|
+
picking: select_pack_picking,
|
|
205
|
+
package: demotools.makePack(),
|
|
206
|
+
packaging: _.sampleSize(
|
|
207
|
+
[
|
|
208
|
+
demotools.makePackaging(),
|
|
209
|
+
demotools.makePackaging(),
|
|
210
|
+
demotools.makePackaging(),
|
|
211
|
+
demotools.makePackaging(),
|
|
212
|
+
demotools.makePackaging(),
|
|
213
|
+
demotools.makePackaging(),
|
|
214
|
+
demotools.makePackaging(),
|
|
215
|
+
demotools.makePackaging(),
|
|
216
|
+
],
|
|
217
|
+
_.random(8)
|
|
218
|
+
),
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
set_packaging: {
|
|
223
|
+
next_state: "summary",
|
|
224
|
+
data: {
|
|
225
|
+
summary: {picking: summary_picking},
|
|
226
|
+
},
|
|
227
|
+
message: {
|
|
228
|
+
message_type: "info",
|
|
229
|
+
body: "Package changed",
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
set_custom_qty: {
|
|
233
|
+
next_state: "select_package",
|
|
234
|
+
data: {
|
|
235
|
+
select_package: {
|
|
236
|
+
picking: select_pack_picking,
|
|
237
|
+
// Simulate unselecting 1 line
|
|
238
|
+
selected_move_lines: select_pack_picking.move_lines,
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
message: {
|
|
242
|
+
message_type: "info",
|
|
243
|
+
body: "Quantity changed",
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
const menuitem_id = demotools.addAppMenu(
|
|
249
|
+
{
|
|
250
|
+
name: "Checkout: case 1",
|
|
251
|
+
scenario: "checkout",
|
|
252
|
+
picking_types: [{id: 27, name: "Random type"}],
|
|
253
|
+
},
|
|
254
|
+
"co_1"
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
demotools.add_case("checkout", menuitem_id, DEMO_CHECKOUT);
|