summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/chrome/action_manager_act_window.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-09-04 09:54:59 +0200
committerAlexandre Kühn <aku@odoo.com>2018-09-04 10:53:25 +0200
commitc63c618312481cfbc3d31cb733d22d54fcc0e7c9 (patch)
treec08bb6ba65ca6945dc38dcf2ba687c42552a2961 /addons/web/static/src/js/chrome/action_manager_act_window.js
parent89011e63ab9631e53ab3ad86667e0309f047a4d0 (diff)
[REF] web: improved fix from 'Edit View: X' (017e7132)
Revision on https://github.com/odoo/odoo/commit/017e71322b6b7f0c232f0d66ba659a5972fc3534 Commit above correctly fixes an issue with 'Edit View: X' menu item in the debug manager, in which the name of the view was missing. To do so, it lets the controller be aware of the name of the view, so that it can be used in the template of the debug menu. However, we think there is a much better solution to fixing this issue: since the debug manager has knowledge of the view action, we can extend this object with the name of the view. This is exactly what this commit does: extend the action view object so that it knows the name of the view. That way, the template is much more readable, as `view.displayName` is more meaningful than `controller.viewName`. Task-ID 1878254
Diffstat (limited to 'addons/web/static/src/js/chrome/action_manager_act_window.js')
-rw-r--r--addons/web/static/src/js/chrome/action_manager_act_window.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/chrome/action_manager_act_window.js b/addons/web/static/src/js/chrome/action_manager_act_window.js
index fbf281632b4..2eacf6caa0d 100644
--- a/addons/web/static/src/js/chrome/action_manager_act_window.js
+++ b/addons/web/static/src/js/chrome/action_manager_act_window.js
@@ -429,6 +429,7 @@ ActionManager.include({
if (View) {
views.push({
accessKey: View.prototype.accessKey || View.prototype.accesskey,
+ displayName: View.prototype.display_name,
fieldsView: fieldsView,
icon: View.prototype.icon,
isMobileFriendly: View.prototype.mobile_friendly,