From e381b7e31aa14ab20ff34f3e443b91daf813b4db Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 18 Jan 2016 13:42:28 +0530 Subject: [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:,") but are records on ir.model.fields (in the form "model:ir.model.fields,field_description:_"). 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 --- addons/web/static/src/js/widgets/debug_manager.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'addons/web/static/src/js/widgets/debug_manager.js') 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({ -- cgit v1.2.3