[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>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user