From c774a218d1bea201e3f2385aa1ebceaca8907727 Mon Sep 17 00:00:00 2001 From: Raf Ven Date: Wed, 23 Jun 2021 10:22:52 +0200 Subject: [PATCH] [MOD] Pass context defined on tree view field When for instance a form_view_ref context is defined on a field in a specific tree view, the context should also be passed when opening the form. --- web_tree_many2one_clickable/__manifest__.py | 2 +- .../static/src/js/web_tree_many2one_clickable.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/web_tree_many2one_clickable/__manifest__.py b/web_tree_many2one_clickable/__manifest__.py index e721d9b15..98b61f913 100644 --- a/web_tree_many2one_clickable/__manifest__.py +++ b/web_tree_many2one_clickable/__manifest__.py @@ -7,7 +7,7 @@ { "name": "Clickable many2one fields for tree views", "summary": "Open the linked resource when clicking on their name", - "version": "14.0.1.0.0", + "version": "14.0.1.0.1", "category": "Hidden", "website": "https://github.com/OCA/web", "author": "Therp BV, " diff --git a/web_tree_many2one_clickable/static/src/js/web_tree_many2one_clickable.js b/web_tree_many2one_clickable/static/src/js/web_tree_many2one_clickable.js index 478ef81ee..2519b2576 100644 --- a/web_tree_many2one_clickable/static/src/js/web_tree_many2one_clickable.js +++ b/web_tree_many2one_clickable/static/src/js/web_tree_many2one_clickable.js @@ -58,6 +58,7 @@ odoo.define("web_tree_many2one_clickable.many2one_clickable", function (require) res_id: self.value.res_id, views: [[false, "form"]], target: "target", + context: self.attrs.context || {}, }); }); this.$el.append($a);