diff --git a/addons/web/static/src/js/widgets/translation_dialog.js b/addons/web/static/src/js/widgets/translation_dialog.js index 426ef68cb35..434b7ebcffe 100644 --- a/addons/web/static/src/js/widgets/translation_dialog.js +++ b/addons/web/static/src/js/widgets/translation_dialog.js @@ -57,10 +57,10 @@ odoo.define('web.TranslationDialog', function (require) { this._super(), this._loadLanguages().then((l) => { this.languages = l; + return this._loadTranslations().then((t) => { + this.translations = t; + }); }), - this._loadTranslations().then((t) => { - this.translations = t; - }) ]).then(() => { this.data = this.translations.map((term) => { let relatedLanguage = this.languages.find((language) => language[0] === term.lang); @@ -91,11 +91,12 @@ odoo.define('web.TranslationDialog', function (require) { * @private */ _loadTranslations: function () { + const domain = [...this.domain, ['lang', 'in', this.languages.map(l => l[0])]]; return this._rpc({ model: 'ir.translation', method: 'search_read', fields: ['lang', 'src', 'value'], - domain: this.domain, + domain: domain, }); }, /**