diff --git a/addons/web/static/src/views/form/form_compiler.js b/addons/web/static/src/views/form/form_compiler.js
index b9b112da4ca..3e87df25729 100644
--- a/addons/web/static/src/views/form/form_compiler.js
+++ b/addons/web/static/src/views/form/form_compiler.js
@@ -18,7 +18,6 @@ import {
makeSeparator,
} from "@web/views/view_compiler";
import { ViewCompiler } from "../view_compiler";
-import { localization } from "@web/core/l10n/localization";
const compilersRegistry = registry.category("form_compilers");
@@ -247,21 +246,6 @@ export class FormCompiler extends ViewCompiler {
}
append(form, compiledList);
}
- if (localization.multiLang) {
- const statusBar = form.querySelector(".o_form_statusbar");
- const translateAlert = createElement("t", {
- "t-if": "__comp__.props.translateAlert",
- "t-call": "web.TranslateAlert",
- "t-call-context": "__comp__",
- });
- if (statusBar) {
- statusBar.parentElement.insertBefore(translateAlert, statusBar.nextSibling);
- } else if (form.querySelector(".o_form_sheet_bg")) {
- form.querySelector(".o_form_sheet_bg").prepend(translateAlert);
- } else {
- form.prepend(translateAlert);
- }
- }
return form;
}
diff --git a/addons/web/static/src/views/form/form_controller.js b/addons/web/static/src/views/form/form_controller.js
index 854935e8616..a64d292e147 100644
--- a/addons/web/static/src/views/form/form_controller.js
+++ b/addons/web/static/src/views/form/form_controller.js
@@ -4,7 +4,6 @@ import { hasTouch } from "@web/core/browser/feature_detection";
import { ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog";
import { makeContext } from "@web/core/context";
import { useDebugCategory } from "@web/core/debug/debug_context";
-import { localization } from "@web/core/l10n/localization";
import { registry } from "@web/core/registry";
import { SIZES } from "@web/core/ui/ui_service";
import { useBus, useService } from "@web/core/utils/hooks";
@@ -20,7 +19,7 @@ import { useViewButtons } from "@web/views/view_button/view_button_hook";
import { useSetupView } from "@web/views/view_hook";
import { FormStatusIndicator } from "./form_status_indicator/form_status_indicator";
-import { Component, onRendered, onWillStart, toRaw, useEffect, useRef, useState } from "@odoo/owl";
+import { Component, onRendered, onWillStart, useEffect, useRef, useState } from "@odoo/owl";
const viewRegistry = registry.category("views");
@@ -184,8 +183,6 @@ export class FormController extends Component {
});
const state = this.props.state || {};
- const { fieldsToTranslate } = state;
- this.fieldsToTranslate = useState(fieldsToTranslate || {});
const activeNotebookPages = { ...state.activeNotebookPages };
this.onNotebookPageChange = (notebookId, page) => {
if (page) {
@@ -202,7 +199,6 @@ export class FormController extends Component {
return {
activeNotebookPages: !this.model.root.isNew ? activeNotebookPages : {},
resId: this.model.root.resId,
- fieldsToTranslate: toRaw(this.fieldsToTranslate),
};
},
});
@@ -441,18 +437,6 @@ export class FormController extends Component {
const record = this.model.root;
let saved = false;
- // Before we save, we gather dirty translate fields data. It needs to be done before the
- // save as nothing will be dirty after. It is why there is a compute part and a show part.
- const dirtyTranslatableFields = localization.multiLang
- ? Object.values(record.fields).filter((f) => f.translate && record.isFieldDirty(f.name))
- : [];
- if (dirtyTranslatableFields.length) {
- const { resId } = record;
- this.fieldsToTranslate[resId] = new Set([
- ...toRaw(this.fieldsToTranslate[resId] || []),
- ...dirtyTranslatableFields,
- ]);
- }
if (this.props.saveRecord) {
saved = await this.props.saveRecord(record, params);
} else {
@@ -463,13 +447,6 @@ export class FormController extends Component {
this.props.onSave(record, params);
}
- // After we saved, we show the previously computed data in the alert (if there is any).
- // It needs to be done after the save because if we were in record creation, the resId
- // changed from false to a number. So it first needs to update the computed data to the new id.
- if (this.fieldsToTranslate.false) {
- this.fieldsToTranslate[record.resId] = this.fieldsToTranslate.false;
- delete this.fieldsToTranslate.false;
- }
return saved;
}
@@ -487,20 +464,6 @@ export class FormController extends Component {
}
}
- get translateAlert() {
- const { resId } = this.model.root;
- if (!this.fieldsToTranslate[resId]) {
- return null;
- }
-
- return {
- fields: this.fieldsToTranslate[resId],
- close: () => {
- delete this.fieldsToTranslate[resId];
- },
- };
- }
-
get className() {
const result = {};
const { size } = this.ui;
diff --git a/addons/web/static/src/views/form/form_controller.xml b/addons/web/static/src/views/form/form_controller.xml
index 7a629df3186..cfd58b23c5b 100644
--- a/addons/web/static/src/views/form/form_controller.xml
+++ b/addons/web/static/src/views/form/form_controller.xml
@@ -37,7 +37,7 @@
-