Public release from ruodoo-project: 19.0 - 2026-07-26 21:17:35 UTC
This commit is contained in:
14
translation_helper/static/src/redefine_view_hook.js
Normal file
14
translation_helper/static/src/redefine_view_hook.js
Normal file
@ -0,0 +1,14 @@
|
||||
/** @odoo-module **/
|
||||
import * as viewHookModule from "@web/views/view_hook";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { useComponent } from "@odoo/owl";
|
||||
import { useTranslateCategory } from "@translation_helper/translate/translate_context";
|
||||
|
||||
const originalUseSetupView = viewHookModule.useSetupView;
|
||||
|
||||
patch(viewHookModule, {
|
||||
useSetupView(params) {
|
||||
useTranslateCategory("view", { component: useComponent() });
|
||||
return originalUseSetupView(params);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user