diff --git a/shopfloor_mobile/static/wms/src/scenario/zone_picking.js b/shopfloor_mobile/static/wms/src/scenario/zone_picking.js
index 31dbfcad7b..553832f0fa 100644
--- a/shopfloor_mobile/static/wms/src/scenario/zone_picking.js
+++ b/shopfloor_mobile/static/wms/src/scenario/zone_picking.js
@@ -116,12 +116,23 @@ const template_mobile = `
:card_color="utils.colors.color_for('screen_step_done')"
/>
+
+
+
+
+
-
JSON.stringify(value) !== "{}");
},
select_line_move_line_detail_options: function () {
const options = {
@@ -415,6 +443,61 @@ const ZonePicking = {
};
return options;
},
+
+ package_list_fields: function (table_mode = false) {
+ const self = this;
+ const fields = [
+ {
+ path: "product.display_name",
+ label: table_mode ? "Product" : null,
+ renderer: function (rec, field) {
+ return "";
+ },
+ },
+ {
+ path: "package_src.name",
+ label: "Pack / Lot",
+ renderer: function (rec, field) {
+ const pkg = _.result(rec, "package_src.name", "");
+ const lot = _.result(rec, "lot.name", "");
+ return lot ? pkg + "\n" + lot : pkg;
+ },
+ },
+ {
+ path: "quantity",
+ label: "Qty",
+ renderer: function (rec, field) {
+ return 1;
+ },
+ },
+ {path: "package_src.weight", label: "Weight"},
+ {
+ path: "picking.scheduled_date",
+ label: "Date",
+ renderer: function (rec, field) {
+ return self.utils.display.render_field_date(rec, field);
+ },
+ },
+ {
+ path: "priority",
+ label: table_mode ? "Priority" : null,
+ render_component: "priority-widget",
+ render_options: function (record) {
+ return {priority: parseInt(record.priority || "0", 10)};
+ },
+ },
+ {
+ path: "location_will_be_empty",
+ render_component: "empty-location-icon",
+ display_no_value: true,
+ },
+ ];
+ if (table_mode) {
+ fields.unshift({path: "location_src.name", label: "Location"});
+ }
+ return fields;
+ },
+
move_line_list_fields: function (table_mode = false) {
const self = this;
const fields = [
@@ -521,6 +604,12 @@ const ZonePicking = {
picking_summary_move_line_detail_fields: function () {
return [{path: "package_src.name", klass: "loud"}];
},
+ hide_qty_picker: function () {
+ if ("handle_complete_mix_pack" in this.state.data) {
+ return this.state.data.handle_complete_mix_pack;
+ }
+ return false;
+ },
},
computed: {
sort_lines_by_btn_label() {
@@ -672,12 +761,20 @@ const ZonePicking = {
},
on_scan: (scanned) => {
const data = this.state.data;
+ // When handling a complete pack the quantity picker is hidden
+ // because all move line of the package will be handled.
+ // So for that case we pass a positive quantity
+ const quantity = data.handle_complete_mix_pack
+ ? data.move_line.quantity
+ : this.scan_destination_qty;
this.wait_call(
this.odoo.call("set_destination", {
move_line_id: data.move_line.id,
barcode: scanned.text,
- quantity: this.scan_destination_qty,
+ quantity: quantity,
confirmation: data.confirmation_required,
+ // package_id: data.is_complete_mix_pack ? data.move_line.package_src.id : null,
+ handle_complete_mix_pack: data.handle_complete_mix_pack,
})
);
},