summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2016-01-18 13:42:28 +0530
committerMartin Trigaux <mat@odoo.com>2016-01-20 16:42:18 +0530
commite381b7e31aa14ab20ff34f3e443b91daf813b4db (patch)
treeb2231b446245873223e9750279e65c4d69b074a6 /addons/web/static/src/js/widgets
parent8c8c02598d37d1e5aa1edcf9a964dcac19d8848a (diff)
[FIX] web: technical translations menu
The action "Technical Translations" was not retrieving the correct translations. Since 9.0, the translations names no longer contains the name of the model (in the form "field:<model>,<name>") but are records on ir.model.fields (in the form "model:ir.model.fields,field_description:<model>_<name>"). The translations of type selection are style a different type (type 'selection'). Create a method that will find the linked fields and retrieve the correct translations. Fixes tw:reis_pt/status/687419541199187969
Diffstat (limited to 'addons/web/static/src/js/widgets')
-rw-r--r--addons/web/static/src/js/widgets/debug_manager.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/addons/web/static/src/js/widgets/debug_manager.js b/addons/web/static/src/js/widgets/debug_manager.js
index 610dcd7819e..36a3a205632 100644
--- a/addons/web/static/src/js/widgets/debug_manager.js
+++ b/addons/web/static/src/js/widgets/debug_manager.js
@@ -5,6 +5,7 @@ var core = require('web.core');
var Dialog = require('web.Dialog');
var formats = require('web.formats');
var framework = require('web.framework');
+var Model = require('web.Model');
var session = require('web.session');
var SystrayMenu = require('web.SystrayMenu');
var utils = require('web.utils');
@@ -148,15 +149,9 @@ if (core.debug) {
});
},
translate: function() {
- this.do_action({
- name: _t("Technical Translation"),
- res_model : 'ir.translation',
- domain : [['type', '!=', 'object'], '|', ['name', '=', this.dataset.model], ['name', 'ilike', this.dataset.model + ',']],
- views: [[false, 'list'], [false, 'form']],
- type : 'ir.actions.act_window',
- view_type : "list",
- view_mode : "list"
- });
+ new Model("ir.translation")
+ .call('get_technical_translations', [this.dataset.model])
+ .then(this.do_action);
},
edit: function(params, evt) {
this.do_action({