From a0b52ab6bd273531cd75fb286b99c4e313ee6992 Mon Sep 17 00:00:00 2001 From: Arnold Moyaux Date: Mon, 6 Nov 2023 16:54:52 +0100 Subject: [PATCH] [FIX] stock: remove incorrect placeholder + default search It's not possible to copy paste in the lot_name directly. It has been remove since the import button. Also add by default a search on hand in the quant view from the stock.move.line. We don't want to show quant already send to customer location or without quantity Part-of: odoo/odoo#141272 --- addons/mrp/wizard/stock_assign_serial_numbers.xml | 2 +- addons/stock/static/src/fields/stock_move_line_x2_many_field.js | 1 + addons/stock/views/stock_move_views.xml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/mrp/wizard/stock_assign_serial_numbers.xml b/addons/mrp/wizard/stock_assign_serial_numbers.xml index 63cc18f430d..edd9d1d7537 100644 --- a/addons/mrp/wizard/stock_assign_serial_numbers.xml +++ b/addons/mrp/wizard/stock_assign_serial_numbers.xml @@ -23,7 +23,7 @@ - + diff --git a/addons/stock/static/src/fields/stock_move_line_x2_many_field.js b/addons/stock/static/src/fields/stock_move_line_x2_many_field.js index 6eb305561f9..568cbf63567 100644 --- a/addons/stock/static/src/fields/stock_move_line_x2_many_field.js +++ b/addons/stock/static/src/fields/stock_move_line_x2_many_field.js @@ -36,6 +36,7 @@ export class SMLX2ManyField extends X2ManyField { ...context, single_product: true, tree_view_ref: "stock.view_stock_quant_tree_simple", + search_default_on_hand: true, }; const productName = this.props.record.data.product_id[1]; const title = _t("Add line: %s", productName); diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml index 2238a193ffe..0f0e8c34223 100644 --- a/addons/stock/views/stock_move_views.xml +++ b/addons/stock/views/stock_move_views.xml @@ -216,7 +216,7 @@ 'default_product_id': parent.product_id, }"/>