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,188 @@
|
|
|
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 DEMO_CLUSTER_PICKING_1 = {
|
|
10
|
+
find_batch: {
|
|
11
|
+
next_state: "confirm_start",
|
|
12
|
+
data: {
|
|
13
|
+
confirm_start: demotools.makeBatch({
|
|
14
|
+
pickings: [demotools.makePicking(), demotools.makePicking()],
|
|
15
|
+
}),
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
list_batch: {
|
|
19
|
+
next_state: "manual_selection",
|
|
20
|
+
message: {
|
|
21
|
+
message_type: "success",
|
|
22
|
+
body: "Previous line postponed",
|
|
23
|
+
},
|
|
24
|
+
data: {
|
|
25
|
+
// Next line to process
|
|
26
|
+
manual_selection: {
|
|
27
|
+
records: demotools.batchList(15),
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
select: {
|
|
32
|
+
next_state: "confirm_start",
|
|
33
|
+
data: {
|
|
34
|
+
confirm_start: demotools.makeBatch({
|
|
35
|
+
pickings: [demotools.makePicking(), demotools.makePicking()],
|
|
36
|
+
}),
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
confirm_start: {
|
|
40
|
+
next_state: "start_line",
|
|
41
|
+
data: {
|
|
42
|
+
start_line: demotools.makeBatchPickingLine(),
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
unassign: {
|
|
46
|
+
next_state: "start",
|
|
47
|
+
},
|
|
48
|
+
scan_line: {
|
|
49
|
+
next_state: "scan_destination",
|
|
50
|
+
data: {
|
|
51
|
+
scan_destination: demotools.makeBatchPickingLine(),
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
scan_destination_pack: {
|
|
55
|
+
next_state: "start_line",
|
|
56
|
+
message: {
|
|
57
|
+
message_type: "success",
|
|
58
|
+
body: "Product 5 put in bin #2",
|
|
59
|
+
},
|
|
60
|
+
data: {
|
|
61
|
+
start_line: demotools.makeBatchPickingLine(),
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
stock_is_zero: {
|
|
65
|
+
next_state: "start_line",
|
|
66
|
+
message: {
|
|
67
|
+
message_type: "success",
|
|
68
|
+
body: "Stock zero confirmed",
|
|
69
|
+
},
|
|
70
|
+
data: {
|
|
71
|
+
// Next line to process
|
|
72
|
+
start_line: demotools.makeBatchPickingLine(),
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
skip_line: {
|
|
76
|
+
next_state: "start_line",
|
|
77
|
+
message: {
|
|
78
|
+
message_type: "success",
|
|
79
|
+
body: "Previous line postponed",
|
|
80
|
+
},
|
|
81
|
+
data: {
|
|
82
|
+
// Next line to process
|
|
83
|
+
start_line: demotools.makeBatchPickingLine(),
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
stock_issue: {
|
|
87
|
+
/*
|
|
88
|
+
# when we still have lines to process
|
|
89
|
+
"start_line",
|
|
90
|
+
# when all lines have been processed and have same
|
|
91
|
+
# destination
|
|
92
|
+
"unload_all",
|
|
93
|
+
# when all lines have been processed and have different
|
|
94
|
+
# destinations
|
|
95
|
+
"unload_single",
|
|
96
|
+
*/
|
|
97
|
+
next_state: "start_line",
|
|
98
|
+
message: {
|
|
99
|
+
message_type: "success",
|
|
100
|
+
body: "Stock out confirmed",
|
|
101
|
+
},
|
|
102
|
+
data: {
|
|
103
|
+
// Next line to process
|
|
104
|
+
start_line: demotools.makeBatchPickingLine(),
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
change_pack_lot: {
|
|
108
|
+
// "change_pack_lot", "scan_destination"
|
|
109
|
+
next_state: "scan_destination",
|
|
110
|
+
data: {
|
|
111
|
+
scan_destination: _.extend({}, demotools.makeBatchPickingLine(), {
|
|
112
|
+
package_dest: demotools.makePack(),
|
|
113
|
+
}),
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
prepare_unload: {
|
|
117
|
+
next_state: "unload_all",
|
|
118
|
+
data: {
|
|
119
|
+
unload_all: _.extend({}, demotools.makeBatch(), {
|
|
120
|
+
location_dest: demotools.makeLocation(),
|
|
121
|
+
}),
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
set_destination_all: {
|
|
125
|
+
OK: {
|
|
126
|
+
next_state: "start_line",
|
|
127
|
+
message: {
|
|
128
|
+
message_type: "success",
|
|
129
|
+
body: "Destination set",
|
|
130
|
+
},
|
|
131
|
+
data: {
|
|
132
|
+
// Next line to process
|
|
133
|
+
start_line: demotools.makeBatchPickingLine(),
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
KO: {
|
|
137
|
+
next_state: "confirm_unload_all",
|
|
138
|
+
data: {
|
|
139
|
+
// Next line to process
|
|
140
|
+
unload_all: {},
|
|
141
|
+
},
|
|
142
|
+
message: {
|
|
143
|
+
message_type: "warning",
|
|
144
|
+
body: "Confirm you want to unload them all?",
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
unload_split: {},
|
|
149
|
+
unload_scan_pack: {},
|
|
150
|
+
unload_scan_destination: {},
|
|
151
|
+
unload_router: {},
|
|
152
|
+
// TODO
|
|
153
|
+
popup: {
|
|
154
|
+
body: "Last operation of transfer XYZ. Next operation ABC is ready to proceed.",
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const DEMO_CLUSTER_PICKING_2 = _.cloneDeep(DEMO_CLUSTER_PICKING_1);
|
|
159
|
+
|
|
160
|
+
DEMO_CLUSTER_PICKING_2.scan_line = {
|
|
161
|
+
next_state: "scan_destination",
|
|
162
|
+
data: {
|
|
163
|
+
scan_destination: {
|
|
164
|
+
...demotools.makeBatchPickingLine(),
|
|
165
|
+
disable_full_bin_action: true,
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const menu_case1_id = demotools.addAppMenu(
|
|
171
|
+
{
|
|
172
|
+
name: "Cluster picking: case 1",
|
|
173
|
+
scenario: "cluster_picking",
|
|
174
|
+
picking_types: [{id: 27, name: "Random type"}],
|
|
175
|
+
},
|
|
176
|
+
"cp_1"
|
|
177
|
+
);
|
|
178
|
+
const menu_case2_id = demotools.addAppMenu(
|
|
179
|
+
{
|
|
180
|
+
name: "Cluster picking: case 2 (no full bin)",
|
|
181
|
+
scenario: "cluster_picking",
|
|
182
|
+
picking_types: [{id: 28, name: "Random type"}],
|
|
183
|
+
},
|
|
184
|
+
"cp_2"
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
demotools.add_case("cluster_picking", menu_case1_id, DEMO_CLUSTER_PICKING_1);
|
|
188
|
+
demotools.add_case("cluster_picking", menu_case2_id, DEMO_CLUSTER_PICKING_2);
|
|
@@ -0,0 +1,79 @@
|
|
|
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 pickings = [];
|
|
10
|
+
const count = 8;
|
|
11
|
+
|
|
12
|
+
for (let i = 1; i < count + 1; i++) {
|
|
13
|
+
const move_lines = demotools.makePickingLines(
|
|
14
|
+
{},
|
|
15
|
+
{lines_count: demotools.getRandomInt(5), line_random_pack: true}
|
|
16
|
+
);
|
|
17
|
+
for (let i = 0; i < demotools.getRandomInt(move_lines.length); i++) {
|
|
18
|
+
// Set some as done
|
|
19
|
+
move_lines[i].qty_done = move_lines[i].quantity;
|
|
20
|
+
}
|
|
21
|
+
pickings.push(
|
|
22
|
+
demotools.makePicking(
|
|
23
|
+
{
|
|
24
|
+
move_lines_count: move_lines.length,
|
|
25
|
+
move_lines: move_lines,
|
|
26
|
+
},
|
|
27
|
+
{no_lines: true}
|
|
28
|
+
)
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const manual_selection_pickings = _.sampleSize(pickings, _.random(1, 8));
|
|
33
|
+
|
|
34
|
+
const scan_deliver = {};
|
|
35
|
+
|
|
36
|
+
manual_selection_pickings.forEach(function (p) {
|
|
37
|
+
scan_deliver[p.name] = {
|
|
38
|
+
// All line have a destination pack
|
|
39
|
+
next_state: "deliver",
|
|
40
|
+
data: {
|
|
41
|
+
deliver: {picking: p},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const DEMO_DELIVERY = {
|
|
47
|
+
scan_deliver: scan_deliver,
|
|
48
|
+
list_stock_picking: {
|
|
49
|
+
next_state: "manual_selection",
|
|
50
|
+
message: null,
|
|
51
|
+
data: {
|
|
52
|
+
manual_selection: {
|
|
53
|
+
pickings: manual_selection_pickings,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
// TODO: it would be nice if we can define handlers to modify demo data
|
|
58
|
+
// in "real way".
|
|
59
|
+
reset_qty_done_pack: {
|
|
60
|
+
next_state: "deliver",
|
|
61
|
+
message: {
|
|
62
|
+
body: "Qty reset done",
|
|
63
|
+
},
|
|
64
|
+
data: {
|
|
65
|
+
deliver: {picking: _.values(scan_deliver)[0]},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
reset_qty_done_line: {
|
|
69
|
+
next_state: "deliver",
|
|
70
|
+
message: {
|
|
71
|
+
body: "Qty reset done",
|
|
72
|
+
},
|
|
73
|
+
data: {
|
|
74
|
+
deliver: {picking: _.values(scan_deliver)[0]},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
demotools.add_case("delivery", DEMO_DELIVERY);
|
|
@@ -0,0 +1,179 @@
|
|
|
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
|
+
// Case for recover existing work on single move line
|
|
10
|
+
const recover_single_move_line_menu_id = demotools.addAppMenu({
|
|
11
|
+
name: "Loc.Cont.Transfer: recover single line",
|
|
12
|
+
scenario: "location_content_transfer",
|
|
13
|
+
picking_types: [{id: 27, name: "Random type"}],
|
|
14
|
+
});
|
|
15
|
+
const single_line_case_move_line = demotools.makeSingleLineOperation();
|
|
16
|
+
const RECOVER_SINGLE_MOVE_LINE_CASE = {
|
|
17
|
+
start_or_recover: {
|
|
18
|
+
next_state: "start_single",
|
|
19
|
+
message: {
|
|
20
|
+
message_type: "info",
|
|
21
|
+
body: "Recovered line from previous session.",
|
|
22
|
+
},
|
|
23
|
+
data: {
|
|
24
|
+
start_single: {
|
|
25
|
+
recovered: true,
|
|
26
|
+
move_line: _.cloneDeep(single_line_case_move_line),
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
scan_line: {
|
|
31
|
+
next_state: "scan_destination",
|
|
32
|
+
message: {
|
|
33
|
+
message_type: "info",
|
|
34
|
+
body: "Recovered line from previous session.",
|
|
35
|
+
},
|
|
36
|
+
data: {
|
|
37
|
+
scan_destination: {
|
|
38
|
+
move_line: _.cloneDeep(single_line_case_move_line),
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
set_destination_line: {
|
|
43
|
+
next_state: "start_single",
|
|
44
|
+
message: {
|
|
45
|
+
message_type: "info",
|
|
46
|
+
body: "Destination set on the line",
|
|
47
|
+
},
|
|
48
|
+
data: {
|
|
49
|
+
start_single: {
|
|
50
|
+
move_line: _.cloneDeep(single_line_case_move_line),
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// Case for recover existing work on single package level
|
|
57
|
+
const recover_single_package_level_menu_id = demotools.addAppMenu({
|
|
58
|
+
name: "Loc.Cont.Transfer: recover single package level",
|
|
59
|
+
scenario: "location_content_transfer",
|
|
60
|
+
picking_types: [{id: 27, name: "Random type"}],
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const single_line_package_level = demotools.makePackageLevel();
|
|
64
|
+
const RECOVER_SINGLE_PACKAGE_LEVEL_CASE = {
|
|
65
|
+
start_or_recover: {
|
|
66
|
+
next_state: "start_single",
|
|
67
|
+
message: {
|
|
68
|
+
message_type: "info",
|
|
69
|
+
body: "Recovered package from previous session.",
|
|
70
|
+
},
|
|
71
|
+
data: {
|
|
72
|
+
start_single: {
|
|
73
|
+
recovered: true,
|
|
74
|
+
package_level: _.cloneDeep(single_line_package_level),
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
scan_line: {
|
|
79
|
+
next_state: "scan_destination",
|
|
80
|
+
message: {
|
|
81
|
+
message_type: "info",
|
|
82
|
+
body: "Recovered package from previous session.",
|
|
83
|
+
},
|
|
84
|
+
data: {
|
|
85
|
+
scan_destination: {
|
|
86
|
+
package_level: _.cloneDeep(single_line_package_level),
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
set_destination_line: {
|
|
91
|
+
next_state: "start_single",
|
|
92
|
+
message: {
|
|
93
|
+
message_type: "info",
|
|
94
|
+
body: "Destination set on the line",
|
|
95
|
+
},
|
|
96
|
+
data: {
|
|
97
|
+
start_single: {
|
|
98
|
+
package_level: _.cloneDeep(single_line_package_level),
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// Case for recover existing work on several lines from the same location
|
|
105
|
+
const recover_move_lines_same_location_menu_id = demotools.addAppMenu({
|
|
106
|
+
name: "Loc.Cont.Transfer: recover lines same loc.",
|
|
107
|
+
scenario: "location_content_transfer",
|
|
108
|
+
picking_types: [{id: 27, name: "Random type"}],
|
|
109
|
+
});
|
|
110
|
+
const same_location = demotools.makeLocation();
|
|
111
|
+
const scan_destination_all_move_lines = demotools.makePickingLines(
|
|
112
|
+
{},
|
|
113
|
+
{lines_count: demotools.getRandomInt(5), line_random_pack: true}
|
|
114
|
+
);
|
|
115
|
+
for (let i = 0; i < scan_destination_all_move_lines.length; i++) {
|
|
116
|
+
// Set same location (clone to avoid circular dep on storage)
|
|
117
|
+
scan_destination_all_move_lines[i].location_src = _.cloneDeep(same_location);
|
|
118
|
+
}
|
|
119
|
+
const RECOVER_MOVE_LINES_SAME_LOCATION_CASE = {
|
|
120
|
+
start_or_recover: {
|
|
121
|
+
next_state: "scan_destination_all",
|
|
122
|
+
message: {
|
|
123
|
+
message_type: "info",
|
|
124
|
+
body: "Recovered lines from previous session.",
|
|
125
|
+
},
|
|
126
|
+
data: {
|
|
127
|
+
scan_destination_all: {
|
|
128
|
+
recovered: true,
|
|
129
|
+
move_lines: _.cloneDeep(scan_destination_all_move_lines),
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
scan_line: {
|
|
134
|
+
next_state: "scan_destination",
|
|
135
|
+
message: {
|
|
136
|
+
message_type: "info",
|
|
137
|
+
body: "Recovered line from previous session.",
|
|
138
|
+
},
|
|
139
|
+
data: {
|
|
140
|
+
scan_destination: {
|
|
141
|
+
move_lines: _.cloneDeep(scan_destination_all_move_lines),
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
set_destination_all: {
|
|
146
|
+
next_state: "start",
|
|
147
|
+
message: {
|
|
148
|
+
message_type: "info",
|
|
149
|
+
body: "Destination set on all lines",
|
|
150
|
+
},
|
|
151
|
+
data: {
|
|
152
|
+
start: {},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
go_to_single: {
|
|
156
|
+
next_state: "start_single",
|
|
157
|
+
data: {
|
|
158
|
+
start_single: {
|
|
159
|
+
move_line: _.cloneDeep(scan_destination_all_move_lines[0]),
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
demotools.add_case(
|
|
166
|
+
"location_content_transfer",
|
|
167
|
+
recover_single_move_line_menu_id,
|
|
168
|
+
RECOVER_SINGLE_MOVE_LINE_CASE
|
|
169
|
+
);
|
|
170
|
+
demotools.add_case(
|
|
171
|
+
"location_content_transfer",
|
|
172
|
+
recover_single_package_level_menu_id,
|
|
173
|
+
RECOVER_SINGLE_PACKAGE_LEVEL_CASE
|
|
174
|
+
);
|
|
175
|
+
demotools.add_case(
|
|
176
|
+
"location_content_transfer",
|
|
177
|
+
recover_move_lines_same_location_menu_id,
|
|
178
|
+
RECOVER_MOVE_LINES_SAME_LOCATION_CASE
|
|
179
|
+
);
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020 Camptocamp SA (http://www.camptocamp.com)
|
|
3
|
+
* @author Thierry Ducrest <thierry.ducrest@camptocamp.com>
|
|
4
|
+
* @author Simone Orsi <simahawk@gmail.com>
|
|
5
|
+
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {demotools} from "/shopfloor_mobile_base/static/wms/src/demo/demo.core.js";
|
|
9
|
+
|
|
10
|
+
const DEMO_SCAN_ANYTHING_PACK1 = {
|
|
11
|
+
data: {
|
|
12
|
+
type: "package",
|
|
13
|
+
barcode: "pack",
|
|
14
|
+
record: demotools.makePackFullDetail({}, {}),
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const DEMO_SCAN_ANYTHING_PACK2 = {
|
|
19
|
+
data: {
|
|
20
|
+
type: "package",
|
|
21
|
+
barcode: "pack2",
|
|
22
|
+
record: demotools.makePackFullDetail({}, {}),
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const DEMO_SCAN_ANYTHING_PACK3 = {
|
|
27
|
+
data: {
|
|
28
|
+
type: "package",
|
|
29
|
+
barcode: "pack3",
|
|
30
|
+
record: demotools.makePackFullDetail({}, {}),
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const DEMO_SCAN_ANYTHING_PRODUCT = {
|
|
35
|
+
data: {
|
|
36
|
+
type: "product",
|
|
37
|
+
barcode: "009932424",
|
|
38
|
+
record: demotools.makeProductFullDetail(),
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const DEMO_SCAN_ANYTHING_PRODUCT_2 = {
|
|
42
|
+
data: {
|
|
43
|
+
type: "product",
|
|
44
|
+
barcode: "prod2",
|
|
45
|
+
record: demotools.makeProductFullDetail(),
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
const DEMO_SCAN_ANYTHING_LOCATION_1 = {
|
|
49
|
+
data: {
|
|
50
|
+
type: "location",
|
|
51
|
+
barcode: "loc1",
|
|
52
|
+
record: demotools.makeLocation({}, {full_detail: true}),
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const DEMO_SCAN_ANYTHING_LOCATION_2 = {
|
|
57
|
+
data: {
|
|
58
|
+
type: "location",
|
|
59
|
+
barcode: "283429834",
|
|
60
|
+
record: demotools.makeLocation({}, {full_detail: true}),
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const DEMO_SCAN_ANYTHING_TRANSFER = {
|
|
65
|
+
data: {
|
|
66
|
+
type: "transfer",
|
|
67
|
+
barcode: "transf",
|
|
68
|
+
record: demotools.makePicking({}, {full_detail: true}),
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
const DEMO_SCAN_ANYTHING_TRANSFER1 = {
|
|
72
|
+
data: {
|
|
73
|
+
type: "transfer",
|
|
74
|
+
barcode: "transf1",
|
|
75
|
+
record: demotools.makePicking({}, {full_detail: true}),
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
const DEMO_SCAN_ANYTHING_TRANSFER2 = {
|
|
79
|
+
data: {
|
|
80
|
+
type: "transfer",
|
|
81
|
+
barcode: "transf2",
|
|
82
|
+
record: demotools.makePicking({}, {full_detail: true}),
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const DEMO_SCAN_ANYTHING_LOT = {
|
|
87
|
+
data: {
|
|
88
|
+
type: "lot",
|
|
89
|
+
barcode: "lot",
|
|
90
|
+
record: demotools.makeLotFullDetail(),
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const DEMO_SCAN_ANYTHING_LOT1 = {
|
|
95
|
+
data: {
|
|
96
|
+
type: "lot",
|
|
97
|
+
barcode: "lot1",
|
|
98
|
+
record: demotools.makeLotFullDetail(),
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
const DEMO_SCAN_ANYTHING_LOT2 = {
|
|
102
|
+
data: {
|
|
103
|
+
type: "lot",
|
|
104
|
+
barcode: "lot2",
|
|
105
|
+
record: demotools.makeLotFullDetail(),
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
demotools.add_case("scan_anything", {
|
|
110
|
+
pack: DEMO_SCAN_ANYTHING_PACK1,
|
|
111
|
+
pack2: DEMO_SCAN_ANYTHING_PACK2,
|
|
112
|
+
pack3: DEMO_SCAN_ANYTHING_PACK3,
|
|
113
|
+
prod: DEMO_SCAN_ANYTHING_PRODUCT,
|
|
114
|
+
prod2: DEMO_SCAN_ANYTHING_PRODUCT_2,
|
|
115
|
+
loc: DEMO_SCAN_ANYTHING_LOCATION_1,
|
|
116
|
+
loc2: DEMO_SCAN_ANYTHING_LOCATION_2,
|
|
117
|
+
tr: DEMO_SCAN_ANYTHING_TRANSFER,
|
|
118
|
+
tr1: DEMO_SCAN_ANYTHING_TRANSFER1,
|
|
119
|
+
tr2: DEMO_SCAN_ANYTHING_TRANSFER2,
|
|
120
|
+
lot: DEMO_SCAN_ANYTHING_LOT,
|
|
121
|
+
lot1: DEMO_SCAN_ANYTHING_LOT1,
|
|
122
|
+
lot2: DEMO_SCAN_ANYTHING_LOT2,
|
|
123
|
+
// TODO: not found
|
|
124
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
// TODO: refactor w/ demotools data
|
|
10
|
+
const CANCEL_MSG_DEFAULT = {
|
|
11
|
+
body: "Operation cancelled",
|
|
12
|
+
message_type: "info",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const DEMO_SINGLE_PACK_TRANSFER_1 = {
|
|
16
|
+
start: {
|
|
17
|
+
data: {
|
|
18
|
+
scan_location: {
|
|
19
|
+
// FIXME: outdated data here
|
|
20
|
+
type: "package",
|
|
21
|
+
id: 1,
|
|
22
|
+
name: "A nice pack 1",
|
|
23
|
+
location_src: {
|
|
24
|
+
id: 1,
|
|
25
|
+
name: "Location SRC 1",
|
|
26
|
+
barcode: "loc1",
|
|
27
|
+
},
|
|
28
|
+
location_dest: {
|
|
29
|
+
id: 2,
|
|
30
|
+
name: "Location DST 2",
|
|
31
|
+
barcode: "loc2",
|
|
32
|
+
},
|
|
33
|
+
product: [
|
|
34
|
+
{id: 1, name: "Product 1", qty: 5},
|
|
35
|
+
{id: 2, name: "Product 2", qty: 2},
|
|
36
|
+
],
|
|
37
|
+
picking: {id: 1, name: "Picking 1"},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
next_state: "scan_location",
|
|
41
|
+
message: undefined,
|
|
42
|
+
},
|
|
43
|
+
validate: {
|
|
44
|
+
data: undefined,
|
|
45
|
+
next_state: "start",
|
|
46
|
+
message: {
|
|
47
|
+
body: "Pack validated",
|
|
48
|
+
message_type: "success",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
cancel: {
|
|
52
|
+
next_state: "start",
|
|
53
|
+
message: CANCEL_MSG_DEFAULT,
|
|
54
|
+
},
|
|
55
|
+
LOC1: {
|
|
56
|
+
data: undefined,
|
|
57
|
+
next_state: "start",
|
|
58
|
+
message: {
|
|
59
|
+
body: "Pack validated",
|
|
60
|
+
message_type: "success",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
LOC2: {
|
|
64
|
+
data: {
|
|
65
|
+
show_completion_info: {
|
|
66
|
+
last_operation_name: "Last operation XYZ",
|
|
67
|
+
next_operation_name: "Next operation XYZ",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
next_state: "show_completion_info",
|
|
71
|
+
message: {},
|
|
72
|
+
},
|
|
73
|
+
LOC3: {
|
|
74
|
+
data: undefined,
|
|
75
|
+
next_state: "start",
|
|
76
|
+
message: {
|
|
77
|
+
body: "Pack validated",
|
|
78
|
+
message_type: "success",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
demotools.add_case("single_pack_transfer", DEMO_SINGLE_PACK_TRANSFER_1);
|