[14.0] [FIX] Clicking on a field with context

Clicking on a field with context like this `{'default_product_id': product_id}` doesn't throws an error.
pull/2780/head
Eduardo De Miguel 2022-02-21 17:56:33 +01:00 committed by maciej-wichowski
parent 8f16b9d648
commit e663a865b9
2 changed files with 4 additions and 2 deletions

View File

@ -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.1",
"version": "14.0.1.0.2",
"category": "Hidden",
"website": "https://github.com/OCA/web",
"author": "Therp BV, "

View File

@ -58,7 +58,9 @@ 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 || {},
context: self.record.getContext({
additionalContext: self.attrs.context || {},
}),
});
});
this.$el.append($a);