Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0] [FIX] Tree m2o clickable: call to get_formview_action() #1498

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ odoo.define('web_tree_many2one_clickable.many2one_clickable', function (require)

var ListRenderer = require('web.ListRenderer');
var ListFieldMany2One = require('web.relational_fields').ListFieldMany2One;
var rpc = require('web.rpc');

ListRenderer.include({
_renderBodyCell: function (record, node, colIndex, options) {
Expand Down Expand Up @@ -48,12 +49,12 @@ odoo.define('web_tree_many2one_clickable.many2one_clickable', function (require)
ev.preventDefault();
ev.stopPropagation();

self.do_action({
type: 'ir.actions.act_window',
res_model: self.field.relation,
res_id: self.value.res_id,
views: [[false, 'form']],
target: 'target',
rpc.query({
model: self.field.relation,
method: 'get_formview_action',
args: [[self.value.res_id]],
}).then(function (action) {
return self.do_action(action);
});
});
this.$el.append($a);
Expand Down