mirror of https://github.com/OCA/web.git
[FIX] web_m2x_options: fix ignored field options
The module was ignoring the local field options 'create' and 'create_edit'. For example, specifying options="{'create': true, 'create_edit': true}" on a field would not override the web_m2x_options system parameters.pull/865/head
parent
85f63d1cf1
commit
04e3da2477
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": 'web_m2x_options',
|
"name": 'web_m2x_options',
|
||||||
"version": "10.0.1.1.0",
|
"version": "10.0.1.1.1",
|
||||||
"depends": [
|
"depends": [
|
||||||
'base',
|
'base',
|
||||||
'web',
|
'web',
|
||||||
|
|
|
@ -142,7 +142,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
|
||||||
var search_result = searcher([["id", "not in", blacklist]]);
|
var search_result = searcher([["id", "not in", blacklist]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(self.options && (self.is_option_set(self.options.create) || self.is_option_set(self.options.create_edit)))) {
|
if (self.options && (self.is_option_set(self.options.create) || self.is_option_set(self.options.create_edit))) {
|
||||||
this.create_rights = this.create_rights || (function(){
|
this.create_rights = this.create_rights || (function(){
|
||||||
return new Model(self.field.relation).call(
|
return new Model(self.field.relation).call(
|
||||||
"check_access_rights", ["create", false]);
|
"check_access_rights", ["create", false]);
|
||||||
|
|
Loading…
Reference in New Issue