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,390 @@
|
|
|
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 {ScenarioBaseMixin} from "/shopfloor_mobile_base/static/wms/src/scenario/mixins.js";
|
|
8
|
+
import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js";
|
|
9
|
+
import {checkout_states} from "./checkout_states.js";
|
|
10
|
+
import event_hub from "/shopfloor_mobile_base/static/wms/src/services/event_hub.js";
|
|
11
|
+
|
|
12
|
+
const Checkout = {
|
|
13
|
+
mixins: [ScenarioBaseMixin],
|
|
14
|
+
/*
|
|
15
|
+
/!\ IMPORTANT: we use many times the same component
|
|
16
|
+
(eg: manual-select or detail-picking-select)
|
|
17
|
+
and to make sure they don't get cached together
|
|
18
|
+
we MUST call them using `:key` to make them unique!
|
|
19
|
+
If you don't, you'll have severe problems of data being shared
|
|
20
|
+
between each instances. This is the real problem:
|
|
21
|
+
you assume to have different instance but indeed you get only 1
|
|
22
|
+
which is reused every time!
|
|
23
|
+
*/
|
|
24
|
+
template: `
|
|
25
|
+
<Screen :screen_info="screen_info">
|
|
26
|
+
<template v-slot:header>
|
|
27
|
+
<state-display-info :info="state.display_info" v-if="state.display_info"/>
|
|
28
|
+
</template>
|
|
29
|
+
<searchbar
|
|
30
|
+
v-show="state.on_scan"
|
|
31
|
+
v-on:found="on_scan"
|
|
32
|
+
:input_placeholder="search_input_placeholder"
|
|
33
|
+
/>
|
|
34
|
+
<div v-if="state_is('select_document')">
|
|
35
|
+
<div class="button-list button-vertical-list full">
|
|
36
|
+
<v-row align="center">
|
|
37
|
+
<v-col class="text-center" cols="12">
|
|
38
|
+
<btn-action @click="state.on_manual_selection">Manual selection</btn-action>
|
|
39
|
+
</v-col>
|
|
40
|
+
</v-row>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div v-if="state_is('manual_selection')">
|
|
44
|
+
<manual-select
|
|
45
|
+
:records="state.data.pickings"
|
|
46
|
+
:options="manual_selection_manual_select_options()"
|
|
47
|
+
:key="make_state_component_key(['checkout', 'manual-select'])"
|
|
48
|
+
/>
|
|
49
|
+
<div class="button-list button-vertical-list full">
|
|
50
|
+
<v-row align="center">
|
|
51
|
+
<v-col class="text-center" cols="12">
|
|
52
|
+
<btn-back />
|
|
53
|
+
</v-col>
|
|
54
|
+
</v-row>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div v-if="state_is('select_line')">
|
|
58
|
+
<item-detail-card
|
|
59
|
+
v-if="current_carrier()"
|
|
60
|
+
:card_color="utils.colors.color_for('detail_carrier_card')"
|
|
61
|
+
:key="make_state_component_key(['picking-carrier', state.data.picking.id])"
|
|
62
|
+
:record="current_carrier()"
|
|
63
|
+
:options="{main: true, key_title: 'name', title_icon: 'mdi-truck-outline'}"
|
|
64
|
+
/>
|
|
65
|
+
<detail-picking-select
|
|
66
|
+
v-bind="select_line_detail_picking_select_props()"
|
|
67
|
+
:key="make_state_component_key(['detail-picking-select'])"
|
|
68
|
+
/>
|
|
69
|
+
<div class="button-list button-vertical-list full">
|
|
70
|
+
<v-row align="center">
|
|
71
|
+
<v-col class="text-center" cols="12">
|
|
72
|
+
<btn-action @click="$root.trigger('summary')">Summary</btn-action>
|
|
73
|
+
</v-col>
|
|
74
|
+
</v-row>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div v-if="state_is('select_package')">
|
|
79
|
+
<v-alert type="info" tile v-if="state.data.packing_info" class="packing-info">
|
|
80
|
+
<p v-text="state.data.packing_info" />
|
|
81
|
+
</v-alert>
|
|
82
|
+
<item-detail-card
|
|
83
|
+
v-if="state.data.picking.carrier"
|
|
84
|
+
:key="make_state_component_key(['picking-carrier', state.data.picking.id])"
|
|
85
|
+
:record="state.data.picking.carrier"
|
|
86
|
+
:options="{main: true, key_title: 'name', title_icon: 'mdi-truck-outline'}"
|
|
87
|
+
/>
|
|
88
|
+
<detail-picking-select
|
|
89
|
+
:record="state.data.picking"
|
|
90
|
+
:select_records="state.data.selected_move_lines"
|
|
91
|
+
:select_options="select_package_manual_select_opts()"
|
|
92
|
+
:key="make_state_component_key(['detail-picking-select'])"
|
|
93
|
+
/>
|
|
94
|
+
<div class="button-list button-vertical-list full">
|
|
95
|
+
<v-row align="center">
|
|
96
|
+
<v-col class="text-center" cols="12">
|
|
97
|
+
<btn-action
|
|
98
|
+
@click="state.on_existing_pack"
|
|
99
|
+
:disabled="_.isEmpty(selected_lines())"
|
|
100
|
+
>Existing pack</btn-action>
|
|
101
|
+
</v-col>
|
|
102
|
+
</v-row>
|
|
103
|
+
<v-row align="center">
|
|
104
|
+
<v-col class="text-center" cols="12">
|
|
105
|
+
<btn-action
|
|
106
|
+
@click="state.on_new_pack"
|
|
107
|
+
:disabled="_.isEmpty(selected_lines())"
|
|
108
|
+
>New pack</btn-action>
|
|
109
|
+
</v-col>
|
|
110
|
+
</v-row>
|
|
111
|
+
<v-row align="center" v-if="state.data.no_package_enabled">
|
|
112
|
+
<v-col class="text-center" cols="12">
|
|
113
|
+
<btn-action
|
|
114
|
+
@click="state.on_without_pack"
|
|
115
|
+
:disabled="_.isEmpty(selected_lines())"
|
|
116
|
+
>Process w/o pack</btn-action>
|
|
117
|
+
</v-col>
|
|
118
|
+
</v-row>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div v-if="state_is('select_delivery_packaging')">
|
|
122
|
+
<item-detail-card
|
|
123
|
+
v-if="current_doc().record.carrier"
|
|
124
|
+
:key="make_state_component_key(['picking-carrier', current_doc().record.id])"
|
|
125
|
+
:record="current_doc().record.carrier"
|
|
126
|
+
:options="{main: true, key_title: 'name', title_icon: 'mdi-truck-outline'}"
|
|
127
|
+
/>
|
|
128
|
+
<manual-select
|
|
129
|
+
:records="state.data.packaging"
|
|
130
|
+
:options="select_delivery_packaging_manual_select_options()"
|
|
131
|
+
:key="make_state_component_key(['checkout', 'select-delivery-packaging'])"
|
|
132
|
+
/>
|
|
133
|
+
<div class="button-list button-vertical-list full">
|
|
134
|
+
<v-row align="center">
|
|
135
|
+
<v-col class="text-center" cols="12">
|
|
136
|
+
<btn-back />
|
|
137
|
+
</v-col>
|
|
138
|
+
</v-row>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
<div v-if="state_is('select_dest_package')">
|
|
142
|
+
<detail-picking-select
|
|
143
|
+
:record="state.data.picking"
|
|
144
|
+
:select_records="state.data.packages"
|
|
145
|
+
:select_options="{list_item_fields: existing_package_select_fields, list_item_component: 'list-item'}"
|
|
146
|
+
:key="make_state_component_key(['detail-picking-select'])"
|
|
147
|
+
/>
|
|
148
|
+
<div class="button-list button-vertical-list full">
|
|
149
|
+
<v-row align="center">
|
|
150
|
+
<v-col class="text-center" cols="12">
|
|
151
|
+
<btn-back />
|
|
152
|
+
</v-col>
|
|
153
|
+
</v-row>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
<div v-if="state_is('change_quantity')">
|
|
157
|
+
<item-detail-card :card_color="utils.colors.color_for('screen_step_done')"
|
|
158
|
+
:key="make_state_component_key(['location_src'])"
|
|
159
|
+
:record="state.data.line"
|
|
160
|
+
:options="{main: true, key_title: 'location_src.name', title_action_field: {action_val_path: 'location_src.barcode'}, }"
|
|
161
|
+
/>
|
|
162
|
+
<item-detail-card :card_color="utils.colors.color_for('screen_step_done')"
|
|
163
|
+
:key="make_state_component_key(['product'])"
|
|
164
|
+
:record="state.data.line"
|
|
165
|
+
:options="utils.wms.move_line_product_detail_options(state.data.line, {fields_blacklist: ['quantity']})"
|
|
166
|
+
/>
|
|
167
|
+
<v-card class="pa-2" :color="utils.colors.color_for('screen_step_todo')">
|
|
168
|
+
<packaging-qty-picker
|
|
169
|
+
:key="make_state_component_key(['packaging-qty-picker', state.data.line.id])"
|
|
170
|
+
v-bind="utils.wms.move_line_qty_picker_props(state.data.line)"
|
|
171
|
+
/>
|
|
172
|
+
</v-card>
|
|
173
|
+
<div class="button-list button-vertical-list full">
|
|
174
|
+
<v-row align="center">
|
|
175
|
+
<v-col class="text-center" cols="12">
|
|
176
|
+
<btn-action @click="$root.trigger('qty_change_confirm')">Confirm</btn-action>
|
|
177
|
+
</v-col>
|
|
178
|
+
</v-row>
|
|
179
|
+
<v-row align="center">
|
|
180
|
+
<v-col class="text-center" cols="12">
|
|
181
|
+
<v-btn color="default" @click="state.on_back">Back</v-btn>
|
|
182
|
+
</v-col>
|
|
183
|
+
</v-row>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
<div v-if="state_is('change_packaging')">
|
|
187
|
+
<detail-picking-select
|
|
188
|
+
:record="state.data.picking"
|
|
189
|
+
:select_records="state.data.packaging"
|
|
190
|
+
:select_options="{list_item_component: 'list-item'}"
|
|
191
|
+
:key="make_state_component_key(['detail-picking-select'])"
|
|
192
|
+
/>
|
|
193
|
+
<div class="button-list button-vertical-list full">
|
|
194
|
+
<v-row align="center">
|
|
195
|
+
<v-col class="text-center" cols="12">
|
|
196
|
+
<btn-back />
|
|
197
|
+
</v-col>
|
|
198
|
+
</v-row>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
<div v-if="state_is('summary')">
|
|
202
|
+
<picking-summary
|
|
203
|
+
:record="state.data.picking"
|
|
204
|
+
:records_grouped="utils.wms.group_lines_by_location(state.data.picking.move_lines, {'group_key': 'location_dest', 'prepare_records': utils.wms.group_by_pack})"
|
|
205
|
+
:list_options="{list_item_options: {actions: ['action_change_pkg', 'action_cancel_line']}}"
|
|
206
|
+
:key="make_state_component_key(['picking-summary'])"
|
|
207
|
+
/>
|
|
208
|
+
<div class="button-list button-vertical-list full">
|
|
209
|
+
<v-row align="center" v-if="!state.data.all_processed">
|
|
210
|
+
<v-col class="text-center" cols="12">
|
|
211
|
+
<btn-action @click="$root.trigger('continue')">Continue checkout</btn-action>
|
|
212
|
+
</v-col>
|
|
213
|
+
</v-row>
|
|
214
|
+
<v-row align="center">
|
|
215
|
+
<v-col class="text-center" cols="12">
|
|
216
|
+
<btn-action action="todo"
|
|
217
|
+
@click="$root.trigger('mark_as_done')"
|
|
218
|
+
:disabled="state.data.picking.move_lines.length < 1">Mark as done</btn-action>
|
|
219
|
+
</v-col>
|
|
220
|
+
</v-row>
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
<div v-if="state_is('confirm_done')">
|
|
224
|
+
<div class="button-list button-vertical-list full">
|
|
225
|
+
<v-row align="center">
|
|
226
|
+
<v-col class="text-center" cols="12">
|
|
227
|
+
<btn-action action="todo" @click="state.on_confirm">Confirm</btn-action>
|
|
228
|
+
</v-col>
|
|
229
|
+
</v-row>
|
|
230
|
+
<v-row align="center">
|
|
231
|
+
<v-col class="text-center" cols="12">
|
|
232
|
+
<btn-back />
|
|
233
|
+
</v-col>
|
|
234
|
+
</v-row>
|
|
235
|
+
</div>
|
|
236
|
+
</div>
|
|
237
|
+
</Screen>
|
|
238
|
+
`,
|
|
239
|
+
computed: {
|
|
240
|
+
existing_package_select_fields: function () {
|
|
241
|
+
return [
|
|
242
|
+
{path: "weight"},
|
|
243
|
+
{path: "move_line_count", label: "Line count"},
|
|
244
|
+
{path: "packaging.name"},
|
|
245
|
+
];
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
methods: {
|
|
249
|
+
current_carrier: function () {
|
|
250
|
+
return (
|
|
251
|
+
this.state.data.picking.carrier || this.state.data.picking.ship_carrier
|
|
252
|
+
);
|
|
253
|
+
},
|
|
254
|
+
screen_title: function () {
|
|
255
|
+
if (_.isEmpty(this.current_doc()) || this.state_is("confirm_start"))
|
|
256
|
+
return this.menu_item().name;
|
|
257
|
+
const title = this.current_doc().record.name;
|
|
258
|
+
return title;
|
|
259
|
+
},
|
|
260
|
+
current_doc: function () {
|
|
261
|
+
const data = this.state_get_data("select_line");
|
|
262
|
+
if (_.isEmpty(data)) {
|
|
263
|
+
return null;
|
|
264
|
+
}
|
|
265
|
+
return {
|
|
266
|
+
record: data.picking,
|
|
267
|
+
identifier: data.picking.name,
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
manual_selection_manual_select_options: function () {
|
|
271
|
+
return {
|
|
272
|
+
group_title_default: "Pickings to process",
|
|
273
|
+
group_color: this.utils.colors.color_for("screen_step_todo"),
|
|
274
|
+
list_item_options: {
|
|
275
|
+
loud_title: true,
|
|
276
|
+
fields: [
|
|
277
|
+
{path: "partner.name"},
|
|
278
|
+
{path: "origin"},
|
|
279
|
+
{path: "carrier.name", label: "Carrier"},
|
|
280
|
+
{path: "move_line_count", label: "Lines"},
|
|
281
|
+
],
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
},
|
|
285
|
+
handle_manual_select_highlight_on_scan: function (res) {
|
|
286
|
+
// We need to ensure that the highlights of the detail-picking-select
|
|
287
|
+
// are updated correctly on scan.
|
|
288
|
+
const move_lines_data = this.get_move_lines_data(res);
|
|
289
|
+
move_lines_data.forEach((line) => {
|
|
290
|
+
let checked = false;
|
|
291
|
+
if (line.qty_done > 0) {
|
|
292
|
+
checked = true;
|
|
293
|
+
}
|
|
294
|
+
event_hub.$emit("manual_select:select_item", {
|
|
295
|
+
rec_id: line.id,
|
|
296
|
+
checked,
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
},
|
|
300
|
+
get_move_lines_data: function (res) {
|
|
301
|
+
// We need to access the data object to find the move lines,
|
|
302
|
+
// and this path will vary depending on the current screen.
|
|
303
|
+
const data = res.data;
|
|
304
|
+
const state_key = res.next_state;
|
|
305
|
+
const path = this.get_move_lines_path(state_key);
|
|
306
|
+
return _.result(data, path, []);
|
|
307
|
+
},
|
|
308
|
+
get_move_lines_path: function (key) {
|
|
309
|
+
const possible_paths = {
|
|
310
|
+
summary: "picking.move_lines",
|
|
311
|
+
select_line: "picking.move_lines",
|
|
312
|
+
select_package: "selected_move_lines",
|
|
313
|
+
select_dest_package: "selected_move_lines",
|
|
314
|
+
};
|
|
315
|
+
return key + "." + possible_paths[key];
|
|
316
|
+
},
|
|
317
|
+
select_delivery_packaging_manual_select_options: function () {
|
|
318
|
+
return {
|
|
319
|
+
showActions: false,
|
|
320
|
+
};
|
|
321
|
+
},
|
|
322
|
+
select_line_detail_picking_select_props: function () {
|
|
323
|
+
const picking = this.state.data.picking;
|
|
324
|
+
const lines = picking.move_lines;
|
|
325
|
+
let grouped_lines = undefined;
|
|
326
|
+
if (this.state.data.group_lines_by_location) {
|
|
327
|
+
grouped_lines = this.select_line_manual_select_group_lines(lines);
|
|
328
|
+
}
|
|
329
|
+
return {
|
|
330
|
+
record: picking,
|
|
331
|
+
select_records: lines,
|
|
332
|
+
select_records_grouped: grouped_lines,
|
|
333
|
+
select_options: this.select_line_manual_select_opts(),
|
|
334
|
+
};
|
|
335
|
+
},
|
|
336
|
+
select_line_manual_select_group_lines: function (lines) {
|
|
337
|
+
return this.utils.wms.group_lines_by_location(lines, {
|
|
338
|
+
prepare_records: this.utils.wms.only_one_package,
|
|
339
|
+
});
|
|
340
|
+
},
|
|
341
|
+
select_line_manual_select_opts: function () {
|
|
342
|
+
return {
|
|
343
|
+
group_color: this.utils.colors.color_for("screen_step_todo"),
|
|
344
|
+
card_klass: "loud-labels",
|
|
345
|
+
list_item_options: {
|
|
346
|
+
show_oneline_package_content:
|
|
347
|
+
this.state.data.show_oneline_package_content,
|
|
348
|
+
},
|
|
349
|
+
};
|
|
350
|
+
},
|
|
351
|
+
select_package_manual_select_opts: function () {
|
|
352
|
+
return {
|
|
353
|
+
multiple: true,
|
|
354
|
+
initValue: this.selected_line_ids(),
|
|
355
|
+
card_klass: "loud-labels",
|
|
356
|
+
list_item_component: "picking-select-package-content",
|
|
357
|
+
list_item_options: {actions: ["action_qty_edit"]},
|
|
358
|
+
};
|
|
359
|
+
},
|
|
360
|
+
selectable_lines: function () {
|
|
361
|
+
const stored = this.state_get_data("select_package");
|
|
362
|
+
return _.result(stored, "selected_move_lines", []);
|
|
363
|
+
},
|
|
364
|
+
selectable_line_ids: function () {
|
|
365
|
+
return this.selectable_lines().map(_.property("id"));
|
|
366
|
+
},
|
|
367
|
+
selected_lines: function () {
|
|
368
|
+
return this.selectable_lines().filter(function (x) {
|
|
369
|
+
return x.qty_done > 0;
|
|
370
|
+
});
|
|
371
|
+
},
|
|
372
|
+
selected_line_ids: function () {
|
|
373
|
+
return this.selected_lines().map(_.property("id"));
|
|
374
|
+
},
|
|
375
|
+
_get_states: function () {
|
|
376
|
+
return checkout_states(this);
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
data: function () {
|
|
380
|
+
return {
|
|
381
|
+
usage: "checkout",
|
|
382
|
+
initial_state_key: "select_document",
|
|
383
|
+
states: this._get_states(),
|
|
384
|
+
};
|
|
385
|
+
},
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
process_registry.add("checkout", Checkout);
|
|
389
|
+
|
|
390
|
+
export default Checkout;
|