diff --git a/addons/stock/static/src/views/list/inventory_report_list.xml b/addons/stock/static/src/views/list/inventory_report_list.xml index 853f20d691b..581ac6683de 100644 --- a/addons/stock/static/src/views/list/inventory_report_list.xml +++ b/addons/stock/static/src/views/list/inventory_report_list.xml @@ -3,7 +3,7 @@ - diff --git a/addons/stock/static/src/views/list/inventory_report_list_controller.js b/addons/stock/static/src/views/list/inventory_report_list_controller.js index 5036b8472f3..a5065acab84 100644 --- a/addons/stock/static/src/views/list/inventory_report_list_controller.js +++ b/addons/stock/static/src/views/list/inventory_report_list_controller.js @@ -35,6 +35,21 @@ export class InventoryReportListController extends ListController { }); } + getActionMenuItems() { + const actionMenus = super.getActionMenuItems(); + if (this.props.resModel === "stock.quant" && (!this.props.context.inventory_mode || this.props.context.inventory_report_mode)) { + // hack so we don't show some of the default actions when it's inappropriate to + const {print, action, other} = actionMenus; + return Object.assign( + {}, + print.filter(a => a.name !== 'Count Sheet'), + action.filter(a => a.name !== 'Set'), + { other: other }, + ); + } + return actionMenus; + } + /** * Handler called when a record has been created or updated. * We need to detect when the user added to the list a quant which already exists diff --git a/addons/stock/views/stock_move_line_views.xml b/addons/stock/views/stock_move_line_views.xml index 83a0cbb36bd..b66f95f1592 100644 --- a/addons/stock/views/stock_move_line_views.xml +++ b/addons/stock/views/stock_move_line_views.xml @@ -4,7 +4,7 @@ stock.move.line.tree stock.move.line - + @@ -27,6 +27,7 @@ decoration-muted="state == 'draft'" decoration-success="state == 'done'" decoration-warning="state not in ('draft','cancel','done','assigned')"/> + @@ -97,6 +98,7 @@ + diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml index 4268d3dbb8c..6ddca0e3a35 100644 --- a/addons/stock/views/stock_move_views.xml +++ b/addons/stock/views/stock_move_views.xml @@ -475,4 +475,6 @@ + + diff --git a/addons/stock_account/static/src/xml/inventory_report.xml b/addons/stock_account/static/src/xml/inventory_report.xml index 288e08ab6ea..d30138acc00 100644 --- a/addons/stock_account/static/src/xml/inventory_report.xml +++ b/addons/stock_account/static/src/xml/inventory_report.xml @@ -2,10 +2,11 @@ - - + + diff --git a/addons/stock_account/views/stock_valuation_layer_views.xml b/addons/stock_account/views/stock_valuation_layer_views.xml index 4e6697e8427..e39dc05d10d 100644 --- a/addons/stock_account/views/stock_valuation_layer_views.xml +++ b/addons/stock_account/views/stock_valuation_layer_views.xml @@ -41,7 +41,7 @@ stock.valuation.layer.tree stock.valuation.layer - @@ -115,6 +115,9 @@ primary + + 1 + @@ -131,6 +134,7 @@ tree,form,pivot {'search_default_has_remaining_qty': 1} + [('product_id.type', '=', 'product')]