[FIX] stock: fix js traceback when selecting all locations
Steps to reproduce: - Install stock - Activate storage locations - Switch to French language - Go to stock/analyse/emplacements - Select all locations A javascript traceback pops up because the names 'Set' and 'Count Sheet' are not translated, therefore we use _t function to translate the terms. opw-3113275 closes odoo/odoo#109261 X-original-commit: 719a6e6223bbde3cdeb0ade5665d95681c436521 Signed-off-by: Tiffany Chang <tic@odoo.com>
This commit is contained in:
@@ -1667,7 +1667,10 @@ msgid "Count Picking Waiting"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#. odoo-javascript
|
||||
#: code:addons/stock/static/src/views/list/inventory_report_list_controller.js:0
|
||||
#: model:ir.actions.report,name:stock.action_report_inventory
|
||||
#, python-format
|
||||
msgid "Count Sheet"
|
||||
msgstr ""
|
||||
|
||||
@@ -6928,8 +6931,11 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#. odoo-javascript
|
||||
#: code:addons/stock/static/src/views/list/inventory_report_list_controller.js:0
|
||||
#: model:ir.actions.server,name:stock.action_view_set_quants_tree
|
||||
#: model_terms:ir.ui.view,arch_db:stock.view_stock_quant_tree_inventory_editable
|
||||
#, python-format
|
||||
msgid "Set"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ export class InventoryReportListController extends ListController {
|
||||
// hack so we don't show some of the default actions when it's inappropriate to
|
||||
const { print, action } = actionMenus;
|
||||
return {
|
||||
action: action.filter((a) => a.name !== "Set"),
|
||||
print: print.filter((a) => a.name !== "Count Sheet"),
|
||||
action: action.filter((a) => a.name !== this.env._t("Set")),
|
||||
print: print.filter((a) => a.name !== this.env._t("Count Sheet")),
|
||||
};
|
||||
}
|
||||
return actionMenus;
|
||||
|
||||
Reference in New Issue
Block a user