summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/form
diff options
context:
space:
mode:
authorVincent Schippefilt <vsc@odoo.com>2019-08-20 07:46:52 +0000
committerVincent Schippefilt <vsc@odoo.com>2019-09-09 13:09:53 +0000
commit029dd1a214f727e25b479610df96b7ee94dd8127 (patch)
tree5b33cb401962523f20c768043def21a7b0349cfc /addons/web/static/src/js/views/form
parent263849c3365af3d62fa5b9ceaff65b2f7b84c092 (diff)
[IMP] web: edit translations in new dialog
Before this commit, translations were edited in a list view with a filter on the field that needed to be translated. After this commit, the translations for each fields are translated in a dedicated dialog. The changes done to the current language are taken into account immediately, both ways, from the dialog to the form and from the form to the dialog. Translating terms is also available in create mode, the user will be prompted to save before editing a translation Task ID: 2028152 closes odoo/odoo#36185 Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js/views/form')
-rw-r--r--addons/web/static/src/js/views/form/form_renderer.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form/form_renderer.js b/addons/web/static/src/js/views/form/form_renderer.js
index decea8867fc..e1395eebb9a 100644
--- a/addons/web/static/src/js/views/form/form_renderer.js
+++ b/addons/web/static/src/js/views/form/form_renderer.js
@@ -1083,7 +1083,11 @@ var FormRenderer = BasicRenderer.extend({
*/
_onTranslate: function (ev) {
ev.preventDefault();
- this.trigger_up('translate', {fieldName: ev.target.name, id: this.state.id});
+ this.trigger_up('translate', {
+ fieldName: ev.target.name,
+ id: this.state.id,
+ isComingFromTranslationAlert: true,
+ });
},
/**
* remove alert fields of record from alertFields object