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,130 @@
|
|
|
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
|
+
/* eslint-disable strict */
|
|
7
|
+
/* eslint-disable no-implicit-globals */
|
|
8
|
+
import {PickingDetailMixin} from "../detail/detail_picking.js";
|
|
9
|
+
|
|
10
|
+
// Maybe worth to move it to its own file
|
|
11
|
+
export var ListActionsConsumerMixin = {
|
|
12
|
+
methods: {
|
|
13
|
+
_get_list_item_actions(to_enable) {
|
|
14
|
+
const actions = [];
|
|
15
|
+
const avail_list_item_actions = this._get_available_list_item_actions();
|
|
16
|
+
to_enable.forEach(function (action) {
|
|
17
|
+
if (
|
|
18
|
+
typeof action === "string" &&
|
|
19
|
+
!_.isUndefined(avail_list_item_actions[action])
|
|
20
|
+
) {
|
|
21
|
+
actions.push(avail_list_item_actions[action]);
|
|
22
|
+
} else {
|
|
23
|
+
// We might get an action description object straight
|
|
24
|
+
actions.push(action);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
return actions;
|
|
28
|
+
},
|
|
29
|
+
_get_available_list_item_actions() {
|
|
30
|
+
return [];
|
|
31
|
+
},
|
|
32
|
+
_get_list_options(opt_key_path) {
|
|
33
|
+
const opts = _.defaults({}, _.result(this.$props, opt_key_path, {}), {
|
|
34
|
+
list_item_actions: this._get_list_item_actions(
|
|
35
|
+
_.result(
|
|
36
|
+
this.$props,
|
|
37
|
+
opt_key_path + ".list_item_options.actions",
|
|
38
|
+
[]
|
|
39
|
+
)
|
|
40
|
+
),
|
|
41
|
+
});
|
|
42
|
+
// _.defaults is not recursive
|
|
43
|
+
opts.list_item_options = _.defaults(
|
|
44
|
+
{},
|
|
45
|
+
_.result(this.$props, opt_key_path + ".list_item_options", {}),
|
|
46
|
+
{
|
|
47
|
+
// More options here if needed
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
return opts;
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export var PickingDetailSelectMixin = {
|
|
56
|
+
mixins: [PickingDetailMixin, ListActionsConsumerMixin],
|
|
57
|
+
props: {
|
|
58
|
+
/**
|
|
59
|
+
* TODO: this flag seems not to be used anymore, shall we get rid of it?
|
|
60
|
+
* And since the value is always false, probably we don't need the picking at all.
|
|
61
|
+
* We can always use detail-picking explicitily.
|
|
62
|
+
* As a consequence, maybe, "picking" should be remove from the name
|
|
63
|
+
* and we should have something like `MoveLineDetailSelect|List`
|
|
64
|
+
* (which is what we need for zone picking for instance).
|
|
65
|
+
*
|
|
66
|
+
* */
|
|
67
|
+
|
|
68
|
+
show_picking_info: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: false,
|
|
71
|
+
},
|
|
72
|
+
select_records: Array,
|
|
73
|
+
select_records_grouped: Array,
|
|
74
|
+
select_options: Object,
|
|
75
|
+
},
|
|
76
|
+
methods: {
|
|
77
|
+
select_opts() {
|
|
78
|
+
const opts = _.defaults({}, this._get_list_options("select_options"), {
|
|
79
|
+
showActions: false,
|
|
80
|
+
list_item_component: "picking-select-line-content",
|
|
81
|
+
});
|
|
82
|
+
return opts;
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
template: `
|
|
86
|
+
<div class="detail-picking-select" v-if="!_.isEmpty(record)">
|
|
87
|
+
|
|
88
|
+
<detail-picking :record="record" v-if="show_picking_info" />
|
|
89
|
+
|
|
90
|
+
<manual-select
|
|
91
|
+
:records="select_records || record.move_lines"
|
|
92
|
+
:grouped_records="select_records_grouped"
|
|
93
|
+
:options="select_opts()"
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
`,
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export var PickingDetailListMixin = {
|
|
100
|
+
mixins: [PickingDetailMixin, ListActionsConsumerMixin],
|
|
101
|
+
props: {
|
|
102
|
+
show_picking_info: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: false,
|
|
105
|
+
},
|
|
106
|
+
records: Array,
|
|
107
|
+
records_grouped: Array,
|
|
108
|
+
list_options: Object,
|
|
109
|
+
},
|
|
110
|
+
methods: {
|
|
111
|
+
list_opts() {
|
|
112
|
+
const opts = _.defaults({}, this._get_list_options("list_options"), {
|
|
113
|
+
showCounters: false,
|
|
114
|
+
});
|
|
115
|
+
return opts;
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
template: `
|
|
119
|
+
<div class="detail-picking-list" v-if="!_.isEmpty(record)">
|
|
120
|
+
|
|
121
|
+
<detail-picking :record="record" v-if="show_picking_info" />
|
|
122
|
+
|
|
123
|
+
<list
|
|
124
|
+
:records="records || record.move_lines"
|
|
125
|
+
:grouped_records="records_grouped"
|
|
126
|
+
:options="list_opts()"
|
|
127
|
+
/>
|
|
128
|
+
</div>
|
|
129
|
+
`,
|
|
130
|
+
};
|
odoo/addons/shopfloor_mobile/static/wms/src/components/scenario_picking_detail/picking_select.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
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
|
+
/* eslint-disable strict */
|
|
7
|
+
/* eslint-disable no-implicit-globals */
|
|
8
|
+
import {PickingDetailSelectMixin} from "./mixins.js";
|
|
9
|
+
import {ItemDetailMixin} from "/shopfloor_mobile_base/static/wms/src/components/detail/detail_mixin.js";
|
|
10
|
+
|
|
11
|
+
Vue.component("detail-picking-select", {
|
|
12
|
+
mixins: [PickingDetailSelectMixin],
|
|
13
|
+
methods: {
|
|
14
|
+
_get_available_list_item_actions() {
|
|
15
|
+
// TODO: we should probably make the 1st class citizens w/ their own object class.
|
|
16
|
+
return {
|
|
17
|
+
action_qty_edit: {
|
|
18
|
+
comp_name: "edit-action",
|
|
19
|
+
get_record: function (rec, action) {
|
|
20
|
+
return rec;
|
|
21
|
+
},
|
|
22
|
+
get_options: function (rec, action) {
|
|
23
|
+
return {click_event: "qty_edit"};
|
|
24
|
+
},
|
|
25
|
+
enabled: function (rec, action) {
|
|
26
|
+
return true;
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
Vue.component("picking-select-line-content", {
|
|
35
|
+
mixins: [ItemDetailMixin],
|
|
36
|
+
props: {
|
|
37
|
+
index: Number,
|
|
38
|
+
count: Number,
|
|
39
|
+
},
|
|
40
|
+
methods: {
|
|
41
|
+
with_pack_list_item_options(record) {
|
|
42
|
+
let fields = [];
|
|
43
|
+
// Display detail fields on demand if the package contains only 1 line
|
|
44
|
+
if (
|
|
45
|
+
this.options.show_oneline_package_content &&
|
|
46
|
+
record.package_dest.move_line_count == 1
|
|
47
|
+
) {
|
|
48
|
+
fields = [
|
|
49
|
+
{path: "product.display_name", label: "Product"},
|
|
50
|
+
{path: "lot.name", label: "Lot"},
|
|
51
|
+
];
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
main: true,
|
|
55
|
+
show_title: true,
|
|
56
|
+
loud_title: true,
|
|
57
|
+
key_title: "package_dest.name",
|
|
58
|
+
title_action_field: {action_val_path: "package_dest.name"},
|
|
59
|
+
fields: fields,
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
without_pack_list_item_options(record) {
|
|
63
|
+
const opts = this.utils.wms.move_line_product_detail_options(record);
|
|
64
|
+
const action_val_path = record.product.barcode
|
|
65
|
+
? "product.barcode"
|
|
66
|
+
: "product.default_code";
|
|
67
|
+
opts.title_action_field = {action_val_path: action_val_path};
|
|
68
|
+
opts.show_title = true;
|
|
69
|
+
opts.loud_title = true;
|
|
70
|
+
return opts;
|
|
71
|
+
},
|
|
72
|
+
get_wrapper_klass(record) {
|
|
73
|
+
return "";
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
pack_list_item_options() {
|
|
78
|
+
if (this.record.package_dest) {
|
|
79
|
+
return this.with_pack_list_item_options(this.record);
|
|
80
|
+
}
|
|
81
|
+
return this.without_pack_list_item_options(this.record);
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
template: `
|
|
85
|
+
<div>
|
|
86
|
+
<div :class="[record.package_dest ? 'has-pack' : 'no-pack', get_wrapper_klass(record)]">
|
|
87
|
+
<list-item v-bind="$props" :options="pack_list_item_options" />
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
`,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
Vue.component("picking-select-package-content", {
|
|
94
|
+
props: {
|
|
95
|
+
record: Object,
|
|
96
|
+
options: Object,
|
|
97
|
+
index: Number,
|
|
98
|
+
count: Number,
|
|
99
|
+
},
|
|
100
|
+
methods: {
|
|
101
|
+
get_wrapper_klass(record) {
|
|
102
|
+
return "";
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
// TODO: We should update the layout of this component so that it's in line
|
|
106
|
+
// with the refactor done to "picking-select-line-content":
|
|
107
|
+
// https://github.com/OCA/wms/pull/583
|
|
108
|
+
template: `
|
|
109
|
+
<div>
|
|
110
|
+
<div :class="[record.package_dest ? 'has-pack' : 'no-pack', get_wrapper_klass(record)]">
|
|
111
|
+
<span class="record-name">{{ record.product.display_name }}</span>
|
|
112
|
+
<div class="lot" v-if="record.lot">
|
|
113
|
+
<span class="label">Lot:</span> <span>{{ record.lot.name }}</span>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="qty done">
|
|
116
|
+
<span class="label">Taken:</span>
|
|
117
|
+
<packaging-qty-picker-display
|
|
118
|
+
:key="make_component_key(['qty-picker-widget', 'taken', record.id])"
|
|
119
|
+
v-bind="utils.wms.move_line_qty_picker_props(record, {qtyInit: record.qty_done})"
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="qty requested">
|
|
123
|
+
<span class="label">Requested:</span>
|
|
124
|
+
<packaging-qty-picker-display
|
|
125
|
+
:key="make_component_key(['qty-picker-widget', 'requested', record.id])"
|
|
126
|
+
v-bind="utils.wms.move_line_qty_picker_props(record, {qtyInit: record.quantity})"
|
|
127
|
+
/>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="vendor-code">
|
|
130
|
+
<span class="label">Vendor code:</span> <span>{{ record.product.supplier_code }}</span>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
`,
|
|
135
|
+
});
|
odoo/addons/shopfloor_mobile/static/wms/src/components/scenario_picking_detail/picking_summary.js
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
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
|
+
/* eslint-disable strict */
|
|
8
|
+
/* eslint-disable no-implicit-globals */
|
|
9
|
+
import {PickingDetailListMixin} from "./mixins.js";
|
|
10
|
+
import {ItemDetailMixin} from "/shopfloor_mobile_base/static/wms/src/components/detail/detail_mixin.js";
|
|
11
|
+
|
|
12
|
+
Vue.component("picking-summary", {
|
|
13
|
+
mixins: [PickingDetailListMixin],
|
|
14
|
+
props: {
|
|
15
|
+
// Take control of which package key (source or destination) is used
|
|
16
|
+
// to cancel the line when cancel line action is available.
|
|
17
|
+
action_cancel_package_key: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "package_dest",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
methods: {
|
|
23
|
+
list_opts() {
|
|
24
|
+
const opts = _.defaults(
|
|
25
|
+
{},
|
|
26
|
+
this.$super(PickingDetailListMixin).list_opts(),
|
|
27
|
+
{
|
|
28
|
+
showCounters: true,
|
|
29
|
+
list_item_component: "picking-summary-content",
|
|
30
|
+
group_color: this.utils.colors.color_for("screen_step_done"),
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
return opts;
|
|
34
|
+
},
|
|
35
|
+
_get_available_list_item_actions() {
|
|
36
|
+
// TODO: we should probably make the 1st class citizens w/ their own object class.
|
|
37
|
+
const self = this;
|
|
38
|
+
return {
|
|
39
|
+
action_change_pkg: {
|
|
40
|
+
comp_name: "edit-action",
|
|
41
|
+
get_record: function (rec, action) {
|
|
42
|
+
/**
|
|
43
|
+
* Here we can get records grouped.
|
|
44
|
+
* If lines have a dest package or not
|
|
45
|
+
* we don't care for a simple reason:
|
|
46
|
+
* if the pack is there then all grouped lines
|
|
47
|
+
* have the same package.
|
|
48
|
+
* The edit action will check by itself
|
|
49
|
+
* if the pkg is there or not and pick the right record.
|
|
50
|
+
* Hence -> always return the move line.
|
|
51
|
+
*/
|
|
52
|
+
if (rec.records) {
|
|
53
|
+
return rec.records[0];
|
|
54
|
+
}
|
|
55
|
+
return rec;
|
|
56
|
+
},
|
|
57
|
+
get_options: function (rec, action) {
|
|
58
|
+
return {click_event: "pkg_change_type"};
|
|
59
|
+
},
|
|
60
|
+
enabled: function (rec, action) {
|
|
61
|
+
// Exclude for non-packaged records.
|
|
62
|
+
// NOTE: `pack` is available only if records are grouped.
|
|
63
|
+
// See `utils.group_by_pack`.
|
|
64
|
+
return !_.isUndefined(rec.pack);
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
action_cancel_line: {
|
|
68
|
+
comp_name: "cancel-move-line-action",
|
|
69
|
+
get_options: function (rec, action) {
|
|
70
|
+
return {
|
|
71
|
+
package_cancel_key: self.$props.action_cancel_package_key,
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
get_record: function (rec, action) {
|
|
75
|
+
if (rec.records) {
|
|
76
|
+
// Lines grouped, get real line
|
|
77
|
+
return rec.records[0];
|
|
78
|
+
}
|
|
79
|
+
return rec;
|
|
80
|
+
},
|
|
81
|
+
enabled: function (rec, action) {
|
|
82
|
+
return true;
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
Vue.component("picking-summary-content", {
|
|
91
|
+
mixins: [ItemDetailMixin],
|
|
92
|
+
props: {
|
|
93
|
+
record: Object,
|
|
94
|
+
options: Object,
|
|
95
|
+
index: Number,
|
|
96
|
+
count: Number,
|
|
97
|
+
},
|
|
98
|
+
data: function () {
|
|
99
|
+
return {
|
|
100
|
+
panel: [],
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
watch: {
|
|
104
|
+
panel: {
|
|
105
|
+
handler: function (newVal, oldVal) {
|
|
106
|
+
// The panel is opened
|
|
107
|
+
$(this.$parent.$el).toggleClass("inner-panel-expanded", newVal == 0);
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
methods: {
|
|
112
|
+
get_group_title: function (record, pkg_type) {
|
|
113
|
+
return this.options.group_header_title_key
|
|
114
|
+
? pkg_type.records[0].product[this.options.group_header_title_key]
|
|
115
|
+
: record.title;
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
template: `
|
|
119
|
+
<div :class="['summary-content', record.key.startsWith('raw') ? 'no-pack' : 'has-pack']">
|
|
120
|
+
<v-expansion-panels v-if="record.key != 'no-pack' && record.records_by_pkg_type" flat v-model="panel">
|
|
121
|
+
<v-expansion-panel v-for="pkg_type in record.records_by_pkg_type" :key="make_component_key(['pkg', index])">
|
|
122
|
+
<v-expansion-panel-header>
|
|
123
|
+
<div class="expansion-panel-header">
|
|
124
|
+
<span class="item-counter">
|
|
125
|
+
<span>{{ index + 1 }} / {{ count }}</span>
|
|
126
|
+
</span>
|
|
127
|
+
<strong>
|
|
128
|
+
{{ get_group_title(record, pkg_type) }}
|
|
129
|
+
</strong>
|
|
130
|
+
<div v-for="(field, index) in options.header_fields">
|
|
131
|
+
<span v-if="field.label" class="label">{{ field.label }}:</span>
|
|
132
|
+
<component
|
|
133
|
+
v-if="field.render_component"
|
|
134
|
+
:is="field.render_component"
|
|
135
|
+
:options="field.render_options ? field.render_options(record) : {}"
|
|
136
|
+
:record="record"
|
|
137
|
+
:key="make_component_key([field.render_component, 'list', index, record.id])"
|
|
138
|
+
/>
|
|
139
|
+
<span v-else>
|
|
140
|
+
{{ render_field_value(record, field) }}
|
|
141
|
+
</span>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</v-expansion-panel-header>
|
|
145
|
+
<v-expansion-panel-content>
|
|
146
|
+
<strong class="pkg-type-name mb-2">{{ pkg_type.title }}</strong>
|
|
147
|
+
<picking-summary-product-detail
|
|
148
|
+
v-for="(prod, i) in pkg_type.records"
|
|
149
|
+
:record="prod"
|
|
150
|
+
:index="i"
|
|
151
|
+
:options="options"
|
|
152
|
+
:key="make_component_key(['pkg', index, i, prod.id])"
|
|
153
|
+
:count="pkg_type.records.length"
|
|
154
|
+
/>
|
|
155
|
+
</v-expansion-panel-content>
|
|
156
|
+
</v-expansion-panel>
|
|
157
|
+
</v-expansion-panels>
|
|
158
|
+
<div v-else v-for="(subrec, i) in record.records">
|
|
159
|
+
<picking-summary-product-detail :record="subrec" :index="index" :count="count" :options="options" :key="make_component_key(['raw', index, subrec.id, i])" />
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
`,
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
Vue.component("picking-summary-product-detail", {
|
|
166
|
+
mixins: [ItemDetailMixin],
|
|
167
|
+
props: {
|
|
168
|
+
record: Object,
|
|
169
|
+
index: Number,
|
|
170
|
+
count: Number,
|
|
171
|
+
options: Object,
|
|
172
|
+
},
|
|
173
|
+
template: `
|
|
174
|
+
<div class="summary-content-item">
|
|
175
|
+
<v-list-item-title v-if="options.show_title">
|
|
176
|
+
<span class="item-counter">
|
|
177
|
+
<span>{{ index + 1 }} / {{ count }}</span>
|
|
178
|
+
</span>
|
|
179
|
+
{{ record.product.display_name }}
|
|
180
|
+
</v-list-item-title>
|
|
181
|
+
<template v-if="_.isEmpty(options.fields)">
|
|
182
|
+
<v-list-item-subtitle>
|
|
183
|
+
<div class="lot" v-if="record.lot">
|
|
184
|
+
<span class="label">Lot:</span> <span>{{ record.lot.name }}</span>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="qty">
|
|
187
|
+
<span class="label">Qty:</span>
|
|
188
|
+
<packaging-qty-picker-display
|
|
189
|
+
:key="make_component_key(['picking-summary', 'qty-picker-widget', 'done', record.id])"
|
|
190
|
+
v-bind="utils.wms.move_line_qty_picker_props(record, {qtyInit: record.qty_done})"
|
|
191
|
+
/>
|
|
192
|
+
</div>
|
|
193
|
+
</v-list-item-subtitle>
|
|
194
|
+
</template>
|
|
195
|
+
<template v-else>
|
|
196
|
+
<v-list-item-subtitle v-for="(field, index) in options.fields">
|
|
197
|
+
<span v-if="field.label" class="label">{{ field.label }}:</span>
|
|
198
|
+
<component
|
|
199
|
+
v-if="field.render_component"
|
|
200
|
+
:is="field.render_component"
|
|
201
|
+
:options="field.render_options ? field.render_options(record) : {}"
|
|
202
|
+
:record="record"
|
|
203
|
+
:key="make_component_key([field.render_component, 'list', index, record.id])"
|
|
204
|
+
/>
|
|
205
|
+
<span v-else>
|
|
206
|
+
{{ render_field_value(record, field) }}
|
|
207
|
+
</span>
|
|
208
|
+
</v-list-item-subtitle>
|
|
209
|
+
</template>
|
|
210
|
+
</div>
|
|
211
|
+
`,
|
|
212
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
ul.packaging {
|
|
2
|
+
list-style: none;
|
|
3
|
+
}
|
|
4
|
+
ul.packaging span:first-child {
|
|
5
|
+
width: 33%;
|
|
6
|
+
float: left;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.summary-content {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
}
|
|
12
|
+
.summary-content .v-list-item__title {
|
|
13
|
+
max-width: 100%;
|
|
14
|
+
white-space: normal;
|
|
15
|
+
font-size: 90%;
|
|
16
|
+
line-height: 130%;
|
|
17
|
+
}
|
|
18
|
+
.summary-content .v-list-item__subtitle {
|
|
19
|
+
font-size: 85%;
|
|
20
|
+
line-height: 125%;
|
|
21
|
+
}
|
|
22
|
+
.summary-content .summary-content-item {
|
|
23
|
+
margin-bottom: 0.4em;
|
|
24
|
+
padding-bottom: 0.4em;
|
|
25
|
+
}
|
|
26
|
+
.summary-content .v-expansion-panel-content .summary-content-item:not(:last-child) {
|
|
27
|
+
border-bottom: 1px dotted #ccc;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* packaging-qty-picker */
|
|
31
|
+
.packaging-qty-picker .v-expansion-panel-header {
|
|
32
|
+
padding: 0;
|
|
33
|
+
min-height: 0;
|
|
34
|
+
}
|
|
35
|
+
.packaging-qty-picker .v-expansion-panel-content {
|
|
36
|
+
border-left: 2px dashed;
|
|
37
|
+
padding-left: 7px;
|
|
38
|
+
}
|
|
39
|
+
.packaging-qty-picker .v-expansion-panel-content > div {
|
|
40
|
+
padding: 0;
|
|
41
|
+
}
|
|
42
|
+
.packaging-qty-picker input {
|
|
43
|
+
line-height: 35px;
|
|
44
|
+
}
|
|
45
|
+
.packaging-qty-picker .qty-done {
|
|
46
|
+
text-align: center;
|
|
47
|
+
width: 100%;
|
|
48
|
+
outline: -webkit-focus-ring-color auto 1px;
|
|
49
|
+
}
|
|
50
|
+
.packaging-qty-picker .qty-todo {
|
|
51
|
+
text-align: center;
|
|
52
|
+
}
|
|
53
|
+
.packaging-qty-picker .pkg-name {
|
|
54
|
+
line-height: 1;
|
|
55
|
+
padding-top: 2px;
|
|
56
|
+
}
|
|
57
|
+
.packaging-qty-picker .pkg-qty {
|
|
58
|
+
font-size: 75%;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/*
|
|
62
|
+
TODO: this is probably to be applied to all .manual-select.
|
|
63
|
+
I tested only w/ checkout/select_package for now
|
|
64
|
+
*/
|
|
65
|
+
.detail-picking-select .manual-select .v-list-item .v-list-item__action--stack {
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.v-list-item.location-will-be-empty .field-detail.location_will_be_empty {
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 5px;
|
|
72
|
+
right: 5px;
|
|
73
|
+
}
|