summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-09-20 12:46:07 +0000
committerMartin Trigaux <mat@odoo.com>2019-09-24 15:52:55 +0000
commit2471ee506f38f5ca54d7bd54084b0ac3d74abeae (patch)
tree0f40dc99590d0c4d93da16e57ef3e170cb1de23b /addons/web/static/src/js/views/basic/basic_controller.js
parent5a9cb644147ee891e1afb3ddf88e052cdda7fb04 (diff)
[FIX] web: translate html fields
This commit fixes: - body of a email.template in a small field - translation of website_description of a product does not show the source of the translation - translation of website_description of a product shows the full content for the current language HTML fields are typically fields with longer of content. If the field is an HTML field, it should be displayed in a textarea, like the text fields. Most of HTML fields are split in meaningful chunks of content (using xml_translate or html_translate method). For these fields, the source must be displayed. Also sort the entries on the source to have a consistent order closes odoo/odoo#37215 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
-rw-r--r--addons/web/static/src/js/views/basic/basic_controller.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_controller.js b/addons/web/static/src/js/views/basic/basic_controller.js
index be0b9a00bf3..21ce85ce025 100644
--- a/addons/web/static/src/js/views/basic/basic_controller.js
+++ b/addons/web/static/src/js/views/basic/basic_controller.js
@@ -833,7 +833,8 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
userLanguageValue: ev.target.value || '',
dataPointID: record.id,
isComingFromTranslationAlert: ev.data.isComingFromTranslationAlert,
- isText: record.fields[ev.data.fieldName].type === 'text',
+ isText: result.context.translation_type === 'text',
+ showSrc: result.context.translation_show_src,
});
return this.translationDialog.open();
},