forked from Techsystech/web
Fix many2many JS error
parent
ee283f97dd
commit
ecacc4e42a
|
@ -316,8 +316,7 @@ openerp.web_m2x_options = function (instance) {
|
||||||
var m2x_create_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create'])
|
var m2x_create_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create'])
|
||||||
var m2x_create = self.view.ir_options['web_m2x_options.create'] == "True"
|
var m2x_create = self.view.ir_options['web_m2x_options.create'] == "True"
|
||||||
|
|
||||||
if (!no_quick_create && ((m2x_create_undef && can_create) ||
|
if (!no_quick_create && (m2x_create_undef || m2x_create)) {
|
||||||
m2x_create)) {
|
|
||||||
|
|
||||||
var raw_result = _(data.result).map(function(x) {return x[1];});
|
var raw_result = _(data.result).map(function(x) {return x[1];});
|
||||||
if (search_val.length > 0 && !_.include(raw_result, search_val)) {
|
if (search_val.length > 0 && !_.include(raw_result, search_val)) {
|
||||||
|
@ -340,8 +339,7 @@ openerp.web_m2x_options = function (instance) {
|
||||||
var m2x_create_edit_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create_edit'])
|
var m2x_create_edit_undef = _.isUndefined(self.view.ir_options['web_m2x_options.create_edit'])
|
||||||
var m2x_create_edit = self.view.ir_options['web_m2x_options.create_edit'] == "True"
|
var m2x_create_edit = self.view.ir_options['web_m2x_options.create_edit'] == "True"
|
||||||
|
|
||||||
if (!no_create_edit && ((m2x_create_edit_undef && can_create) ||
|
if (!no_create_edit && (m2x_create_edit_undef || m2x_create_edit)) {
|
||||||
m2x_create_edit)) {
|
|
||||||
|
|
||||||
values.push({
|
values.push({
|
||||||
label: _t("Create and Edit..."),
|
label: _t("Create and Edit..."),
|
||||||
|
|
Loading…
Reference in New Issue