Public release from ruodoo-project: 19.0 - 2026-05-31 21:19:12 UTC
This commit is contained in:
21
translation_helper/static/src/translate/translate_utils.js
Normal file
21
translation_helper/static/src/translate/translate_utils.js
Normal file
@ -0,0 +1,21 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import {TranslationDialog} from "@web/views/fields/translation_dialog";
|
||||
|
||||
export function editModelTranslate(env, title, model, id, reloadType) {
|
||||
env.services.dialog.add(TranslationDialog, {
|
||||
fieldName: "arch_db",
|
||||
resId: id,
|
||||
resModel: model,
|
||||
userLanguageValue: env.services.user.lang,
|
||||
userUserCurrentLang: true,
|
||||
isComingFromTranslationAlert: false,
|
||||
onSave: async () => {
|
||||
env.bus.trigger("CLEAR-CACHES");
|
||||
await env.services.action.doAction({
|
||||
type: "ir.actions.client",
|
||||
tag: reloadType,
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user