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,380 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2020 Camptocamp SA (http://www.camptocamp.com)
|
|
3
|
+
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
Define states for checkout scenario.
|
|
8
|
+
@param $instance VueJS component instance
|
|
9
|
+
*/
|
|
10
|
+
export const checkout_states = function ($instance) {
|
|
11
|
+
return {
|
|
12
|
+
select_document: {
|
|
13
|
+
display_info: {
|
|
14
|
+
title: "Choose an order to pack",
|
|
15
|
+
scan_placeholder: () => {
|
|
16
|
+
if ($instance.state.data.restrict_scan_first) {
|
|
17
|
+
return "Scan pack / picking / location";
|
|
18
|
+
}
|
|
19
|
+
return "Scan pack / product / picking / location";
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
on_scan: (scanned) => {
|
|
23
|
+
$instance.wait_call(
|
|
24
|
+
$instance.odoo.call("scan_document", {barcode: scanned.text})
|
|
25
|
+
);
|
|
26
|
+
},
|
|
27
|
+
on_manual_selection: (evt) => {
|
|
28
|
+
$instance.wait_call($instance.odoo.call("list_stock_picking"));
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
manual_selection: {
|
|
32
|
+
display_info: {
|
|
33
|
+
title: "Select a picking and start",
|
|
34
|
+
},
|
|
35
|
+
events: {
|
|
36
|
+
select: "on_select",
|
|
37
|
+
go_back: "on_back",
|
|
38
|
+
},
|
|
39
|
+
on_back: () => {
|
|
40
|
+
$instance.state_to("init");
|
|
41
|
+
$instance.reset_notification();
|
|
42
|
+
},
|
|
43
|
+
on_select: (selected) => {
|
|
44
|
+
$instance.wait_call(
|
|
45
|
+
$instance.odoo.call("select", {
|
|
46
|
+
picking_id: selected.id,
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
select_line: {
|
|
52
|
+
display_info: {
|
|
53
|
+
title: "Pick the product by scanning something",
|
|
54
|
+
scan_placeholder: "Scan pack / product / lot / delivery package",
|
|
55
|
+
},
|
|
56
|
+
events: {
|
|
57
|
+
summary: "on_summary",
|
|
58
|
+
select: "on_select",
|
|
59
|
+
back: "on_back",
|
|
60
|
+
},
|
|
61
|
+
on_scan: (scanned) => {
|
|
62
|
+
$instance.wait_call(
|
|
63
|
+
$instance.odoo.call("scan_line", {
|
|
64
|
+
picking_id: $instance.state.data.picking.id,
|
|
65
|
+
barcode: scanned.text,
|
|
66
|
+
confirm_pack_all: $instance.state.data.need_confirm_pack_all,
|
|
67
|
+
})
|
|
68
|
+
);
|
|
69
|
+
},
|
|
70
|
+
on_select: (selected) => {
|
|
71
|
+
if (!selected) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
$instance.wait_call(
|
|
75
|
+
$instance.odoo.call("select_line", {
|
|
76
|
+
picking_id: $instance.state.data.picking.id,
|
|
77
|
+
move_line_id: selected.id,
|
|
78
|
+
package_id: _.result(selected, "package_dest.id", false),
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
},
|
|
82
|
+
on_back: () => {
|
|
83
|
+
$instance.state_to("start");
|
|
84
|
+
$instance.reset_notification();
|
|
85
|
+
},
|
|
86
|
+
on_summary: () => {
|
|
87
|
+
$instance.wait_call(
|
|
88
|
+
$instance.odoo.call("summary", {
|
|
89
|
+
picking_id: $instance.state.data.picking.id,
|
|
90
|
+
})
|
|
91
|
+
);
|
|
92
|
+
},
|
|
93
|
+
// FIXME: is not to change qty
|
|
94
|
+
on_edit_package: (pkg) => {
|
|
95
|
+
$instance.state_set_data({package: pkg}, "change_quantity");
|
|
96
|
+
$instance.state_to("change_quantity");
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
select_package: {
|
|
100
|
+
// TODO: /set_line_qty is not handled yet
|
|
101
|
+
// because is not clear how to handle line selection
|
|
102
|
+
// and qty set.
|
|
103
|
+
// ATM given that manual-select uses v-list-item-group
|
|
104
|
+
// when you touch a line you select/unselect it
|
|
105
|
+
// which means we cannot rely on this to go to edit.
|
|
106
|
+
// If we need it, we have to change manual-select
|
|
107
|
+
// to use pure list + checkboxes.
|
|
108
|
+
display_info: {
|
|
109
|
+
title: "Select package",
|
|
110
|
+
scan_placeholder: "Scan existing package / package type",
|
|
111
|
+
},
|
|
112
|
+
events: {
|
|
113
|
+
qty_edit: "on_qty_edit",
|
|
114
|
+
select: "on_select",
|
|
115
|
+
back: "on_back",
|
|
116
|
+
},
|
|
117
|
+
on_scan: (scanned) => {
|
|
118
|
+
$instance.wait_call(
|
|
119
|
+
$instance.odoo
|
|
120
|
+
.call("scan_package_action", {
|
|
121
|
+
picking_id: $instance.state.data.picking.id,
|
|
122
|
+
selected_line_ids: $instance.selectable_line_ids(),
|
|
123
|
+
barcode: scanned.text,
|
|
124
|
+
})
|
|
125
|
+
.then((res) => {
|
|
126
|
+
$instance.handle_manual_select_highlight_on_scan(res);
|
|
127
|
+
return res;
|
|
128
|
+
})
|
|
129
|
+
);
|
|
130
|
+
},
|
|
131
|
+
on_select: (selected) => {
|
|
132
|
+
if (!selected) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const orig_selected = $instance.selected_line_ids();
|
|
136
|
+
const selected_ids = selected.map(_.property("id"));
|
|
137
|
+
const to_select = _.head(
|
|
138
|
+
$instance.selectable_lines().filter(function (x) {
|
|
139
|
+
return (
|
|
140
|
+
selected_ids.includes(x.id) && !orig_selected.includes(x.id)
|
|
141
|
+
);
|
|
142
|
+
})
|
|
143
|
+
);
|
|
144
|
+
const to_unselect = _.head(
|
|
145
|
+
$instance.selectable_lines().filter(function (x) {
|
|
146
|
+
return (
|
|
147
|
+
!selected_ids.includes(x.id) && orig_selected.includes(x.id)
|
|
148
|
+
);
|
|
149
|
+
})
|
|
150
|
+
);
|
|
151
|
+
let endpoint, move_line;
|
|
152
|
+
if (to_unselect) {
|
|
153
|
+
endpoint = "reset_line_qty";
|
|
154
|
+
move_line = to_unselect;
|
|
155
|
+
} else if (to_select) {
|
|
156
|
+
endpoint = "set_line_qty";
|
|
157
|
+
move_line = to_select;
|
|
158
|
+
}
|
|
159
|
+
$instance.wait_call(
|
|
160
|
+
$instance.odoo.call(endpoint, {
|
|
161
|
+
picking_id: $instance.state.data.picking.id,
|
|
162
|
+
selected_line_ids: $instance.selectable_line_ids(),
|
|
163
|
+
move_line_id: move_line.id,
|
|
164
|
+
})
|
|
165
|
+
);
|
|
166
|
+
},
|
|
167
|
+
on_qty_edit: (record) => {
|
|
168
|
+
$instance.state_set_data(
|
|
169
|
+
{
|
|
170
|
+
picking: $instance.state.data.picking,
|
|
171
|
+
line: record,
|
|
172
|
+
selected_line_ids: $instance.selectable_line_ids(),
|
|
173
|
+
},
|
|
174
|
+
"change_quantity"
|
|
175
|
+
);
|
|
176
|
+
$instance.state_to("change_quantity");
|
|
177
|
+
},
|
|
178
|
+
on_new_pack: () => {
|
|
179
|
+
$instance.wait_call(
|
|
180
|
+
$instance.odoo.call("list_delivery_packaging", {
|
|
181
|
+
picking_id: $instance.state.data.picking.id,
|
|
182
|
+
selected_line_ids: $instance.selectable_line_ids(),
|
|
183
|
+
})
|
|
184
|
+
);
|
|
185
|
+
},
|
|
186
|
+
on_existing_pack: () => {
|
|
187
|
+
$instance.wait_call(
|
|
188
|
+
$instance.odoo.call("list_dest_package", {
|
|
189
|
+
picking_id: $instance.state.data.picking.id,
|
|
190
|
+
selected_line_ids: $instance.selectable_line_ids(),
|
|
191
|
+
})
|
|
192
|
+
);
|
|
193
|
+
},
|
|
194
|
+
on_without_pack: () => {
|
|
195
|
+
$instance.wait_call(
|
|
196
|
+
$instance.odoo.call("no_package", {
|
|
197
|
+
picking_id: $instance.state.data.picking.id,
|
|
198
|
+
selected_line_ids: $instance.selectable_line_ids(),
|
|
199
|
+
})
|
|
200
|
+
);
|
|
201
|
+
},
|
|
202
|
+
on_back: () => {
|
|
203
|
+
$instance.state_to("select_line");
|
|
204
|
+
$instance.reset_notification();
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
select_delivery_packaging: {
|
|
208
|
+
display_info: {
|
|
209
|
+
title: "Select delivery packaging",
|
|
210
|
+
scan_placeholder: "Scan package type",
|
|
211
|
+
},
|
|
212
|
+
events: {
|
|
213
|
+
select: "on_select",
|
|
214
|
+
back: "on_back",
|
|
215
|
+
},
|
|
216
|
+
on_select: (selected) => {
|
|
217
|
+
$instance.state.on_scan({text: selected.barcode});
|
|
218
|
+
},
|
|
219
|
+
on_scan: (scanned) => {
|
|
220
|
+
const picking = $instance.current_doc().record;
|
|
221
|
+
$instance.wait_call(
|
|
222
|
+
$instance.odoo.call("scan_package_action", {
|
|
223
|
+
picking_id: picking.id,
|
|
224
|
+
selected_line_ids: $instance.selected_line_ids(),
|
|
225
|
+
barcode: scanned.text,
|
|
226
|
+
})
|
|
227
|
+
);
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
change_quantity: {
|
|
231
|
+
display_info: {
|
|
232
|
+
title: "Change quantity",
|
|
233
|
+
},
|
|
234
|
+
events: {
|
|
235
|
+
qty_change_confirm: "on_confirm",
|
|
236
|
+
qty_edit: "on_qty_update",
|
|
237
|
+
},
|
|
238
|
+
on_back: () => {
|
|
239
|
+
$instance.state_to("select_package");
|
|
240
|
+
$instance.reset_notification();
|
|
241
|
+
},
|
|
242
|
+
on_qty_update: (qty) => {
|
|
243
|
+
$instance.state.data.qty = qty;
|
|
244
|
+
},
|
|
245
|
+
on_confirm: () => {
|
|
246
|
+
$instance.wait_call(
|
|
247
|
+
$instance.odoo.call("set_custom_qty", {
|
|
248
|
+
picking_id: $instance.state.data.picking.id,
|
|
249
|
+
selected_line_ids: $instance.selectable_line_ids(),
|
|
250
|
+
move_line_id: $instance.state.data.line.id,
|
|
251
|
+
qty_done: $instance.state.data.qty,
|
|
252
|
+
})
|
|
253
|
+
);
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
select_dest_package: {
|
|
257
|
+
display_info: {
|
|
258
|
+
title: "Select destination package",
|
|
259
|
+
},
|
|
260
|
+
events: {
|
|
261
|
+
select: "on_select",
|
|
262
|
+
back: "on_back",
|
|
263
|
+
},
|
|
264
|
+
on_scan: (scanned) => {
|
|
265
|
+
$instance.wait_call(
|
|
266
|
+
$instance.odoo.call("scan_dest_package", {
|
|
267
|
+
picking_id: $instance.state.data.picking.id,
|
|
268
|
+
selected_line_ids: $instance.selected_line_ids(),
|
|
269
|
+
barcode: scanned.text,
|
|
270
|
+
})
|
|
271
|
+
);
|
|
272
|
+
},
|
|
273
|
+
on_select: (selected) => {
|
|
274
|
+
if (!selected) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
$instance.wait_call(
|
|
278
|
+
$instance.odoo.call("set_dest_package", {
|
|
279
|
+
picking_id: $instance.state.data.picking.id,
|
|
280
|
+
selected_line_ids: $instance.selected_line_ids(),
|
|
281
|
+
package_id: selected.id,
|
|
282
|
+
})
|
|
283
|
+
);
|
|
284
|
+
},
|
|
285
|
+
on_back: () => {
|
|
286
|
+
$instance.state_to("select_package");
|
|
287
|
+
$instance.reset_notification();
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
summary: {
|
|
291
|
+
display_info: {
|
|
292
|
+
title: "Summary",
|
|
293
|
+
},
|
|
294
|
+
events: {
|
|
295
|
+
select: "on_select",
|
|
296
|
+
back: "on_back",
|
|
297
|
+
cancel_picking_line: "on_cancel",
|
|
298
|
+
pkg_change_type: "on_pkg_change_type",
|
|
299
|
+
mark_as_done: "on_mark_as_done",
|
|
300
|
+
continue: "on_continue",
|
|
301
|
+
},
|
|
302
|
+
on_back: () => {
|
|
303
|
+
$instance.state_to("start");
|
|
304
|
+
$instance.reset_notification();
|
|
305
|
+
},
|
|
306
|
+
on_pkg_change_type: (pkg) => {
|
|
307
|
+
$instance.wait_call(
|
|
308
|
+
$instance.odoo.call("list_packaging", {
|
|
309
|
+
picking_id: $instance.state.data.picking.id,
|
|
310
|
+
package_id: pkg.id,
|
|
311
|
+
})
|
|
312
|
+
);
|
|
313
|
+
},
|
|
314
|
+
on_cancel: (data) => {
|
|
315
|
+
$instance.wait_call(
|
|
316
|
+
$instance.odoo.call("cancel_line", {
|
|
317
|
+
picking_id: $instance.state.data.picking.id,
|
|
318
|
+
// We get either line_id or package_id
|
|
319
|
+
package_id: data.package_id,
|
|
320
|
+
line_id: data.line_id,
|
|
321
|
+
})
|
|
322
|
+
);
|
|
323
|
+
},
|
|
324
|
+
on_mark_as_done: () => {
|
|
325
|
+
$instance.wait_call(
|
|
326
|
+
$instance.odoo.call("done", {
|
|
327
|
+
picking_id: $instance.state.data.picking.id,
|
|
328
|
+
})
|
|
329
|
+
);
|
|
330
|
+
},
|
|
331
|
+
on_continue: () => {
|
|
332
|
+
$instance.wait_call(
|
|
333
|
+
$instance.odoo.call("select", {
|
|
334
|
+
picking_id: $instance.state.data.picking.id,
|
|
335
|
+
})
|
|
336
|
+
);
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
change_packaging: {
|
|
340
|
+
display_info: {
|
|
341
|
+
title: "Change packaging",
|
|
342
|
+
},
|
|
343
|
+
events: {
|
|
344
|
+
select: "on_select",
|
|
345
|
+
},
|
|
346
|
+
on_select: (selected) => {
|
|
347
|
+
if (!selected) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
$instance.wait_call(
|
|
351
|
+
$instance.odoo.call("set_packaging", {
|
|
352
|
+
picking_id: $instance.state.data.picking.id,
|
|
353
|
+
package_id: $instance.state.data.package.id,
|
|
354
|
+
package_type_id: selected.id,
|
|
355
|
+
})
|
|
356
|
+
);
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
confirm_done: {
|
|
360
|
+
display_info: {
|
|
361
|
+
title: "Confirm done",
|
|
362
|
+
},
|
|
363
|
+
events: {
|
|
364
|
+
go_back: "on_back",
|
|
365
|
+
},
|
|
366
|
+
on_confirm: () => {
|
|
367
|
+
$instance.wait_call(
|
|
368
|
+
$instance.odoo.call("done", {
|
|
369
|
+
picking_id: $instance.state.data.picking.id,
|
|
370
|
+
confirmation: true,
|
|
371
|
+
})
|
|
372
|
+
);
|
|
373
|
+
},
|
|
374
|
+
on_back: () => {
|
|
375
|
+
$instance.state_to("summary");
|
|
376
|
+
$instance.reset_notification();
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
};
|
|
380
|
+
};
|