From 6999a862fdff34ea7d05ba90c2977f2c386cb506 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 17 Feb 2016 15:28:12 +0100 Subject: [PATCH] [FIX] base: translation window DO NOT FORWARD-PORT TO MASTER When the user wants to edit the translation of a view, a JS traceback appears. The reason is that the `WebClient.DebugManager.View` tries to access `view.controller.fields_view.view_id` before the fields_view_get is actually resolved. The issue is that the DebugManager is loaded when the dialog is opened. However, the dialog is opened before its content is actually loaded. The proper fix would be to open the dialog only when the content is ready. Since this might imply side effects, this fix will be done in master branch, not in the stable saas-7. The workaround is to open the translation window in the current window, not in a dialog window. opw-669140 --- openerp/addons/base/ir/ir_translation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/ir/ir_translation.py b/openerp/addons/base/ir/ir_translation.py index 6f971c4f5ba..31500322f2e 100644 --- a/openerp/addons/base/ir/ir_translation.py +++ b/openerp/addons/base/ir/ir_translation.py @@ -660,7 +660,7 @@ class ir_translation(osv.osv): 'type': 'ir.actions.act_window', 'view_mode': 'tree', 'view_id': self.env.ref('base.view_translation_dialog_tree').id, - 'target': 'new', + 'target': 'current', 'flags': {'search_view': True, 'action_buttons': True}, 'domain': domain, }