diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2020-07-02 12:46:47 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2020-07-03 07:43:03 +0000 |
| commit | 88c328bcd050e935c8fc95a152b9b140116a5676 (patch) | |
| tree | 363e77d32b7387554dcc24964869f5f07a725dd7 /addons/web/static/src/js | |
| parent | ea7b5f059cc56ffc17032a3206c2bbbb354be176 (diff) | |
[FIX] web: do not suggest translation for empty HTML field
- Activate more than one language
- Install sale_quotation_builder
- Create a new quotation model without website description
- Create a SO using this model, Save
The 'Please update translations of' is displayed for the website
desctiption, although it is empty: when clicking on the link, no record
is shown.
This happens because an empty HTML field always contains at least
`<p><br></p>`.
We do not consider the latter string for translation.
opw-2274203
closes odoo/odoo#54025
X-original-commit: aad4d516b6fb4b286f24bc536e5ecb67558a0c4d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/form/form_controller.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form/form_controller.js b/addons/web/static/src/js/views/form/form_controller.js index 30eea51d740..c3acdf71e0a 100644 --- a/addons/web/static/src/js/views/form/form_controller.js +++ b/addons/web/static/src/js/views/form/form_controller.js @@ -248,7 +248,7 @@ var FormController = BasicController.extend({ for (var k = 0; k < changedFields.length; k++) { var field = fields[changedFields[k]]; var fieldData = data[changedFields[k]]; - if (field.translate && fieldData) { + if (field.translate && fieldData && fieldData !== '<p><br></p>') { alertFields[changedFields[k]] = field; } } |
