Browse Source

[IMP] also make the module work for many2many fields

pull/1205/head
Holger Brunn 6 years ago
parent
commit
517baff395
  1. 10
      web_action_conditionable/static/src/js/views.js

10
web_action_conditionable/static/src/js/views.js

@ -46,6 +46,16 @@ openerp.web_action_conditionable = function (instance) {
}, },
}); });
instance.web.form.Many2ManyListView.include({
is_action_enabled: function(action) {
if (action in this.fields_view.arch.attrs) {
return (new instance.web.View()).is_action_enabled.apply(
this, arguments
);
}
return true;
},
});
instance.web.FormView.include({ instance.web.FormView.include({
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);

Loading…
Cancel
Save