summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorJason Van Malder <jvm@odoo.com>2020-01-07 14:31:35 +0000
committerJason Van Malder <jvm@odoo.com>2020-01-08 14:10:19 +0000
commitddfa8768cc9aa0685d8908741936093e5aa335ea (patch)
tree51076288081a8b291229f235164cfe65a852294c /addons/web/static/src/js/views/basic/basic_controller.js
parent04bd54d0bc95a82e805230850a826e9e80e911f5 (diff)
[FIX] web: fix question error message translation
Issue - Take a v13 runbot - Open survey's app - Open one of the surveys - Click on edit - Click on a question - Open 'option tab' - Make sur the field 'mandatory answer' is true - Try to translate field 'error message' -> Error Cause this occur because because we try to update the model survey.question from the list coming from survey.survey which mean that the record.viewType is list and not form. Solution As we are looking for the field name we can simply use ev.data.fieldName. Another solution should be to use this.viewType instead of the record one. OPW-2157631 closes odoo/odoo#42952 X-original-commit: ad115d2710aec2b4ff7d4077714a1816cdfb433e Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.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.js2
1 files changed, 1 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 ddc1795cb14..58e03efb94a 100644
--- a/addons/web/static/src/js/views/basic/basic_controller.js
+++ b/addons/web/static/src/js/views/basic/basic_controller.js
@@ -837,7 +837,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
this.translationDialog = new TranslationDialog(this, {
domain: result.domain,
searchName: result.context.search_default_name,
- fieldName: record.fieldsInfo[record.viewType][ev.data.fieldName].name,
+ fieldName: ev.data.fieldName,
userLanguageValue: ev.target.value || '',
dataPointID: record.id,
isComingFromTranslationAlert: ev.data.isComingFromTranslationAlert,