diff --git a/web_m2x_options/i18n/ar.po b/web_m2x_options/i18n/ar.po new file mode 100644 index 000000000..1011622c2 --- /dev/null +++ b/web_m2x_options/i18n/ar.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +# Translators: +# SaFi J. , 2015 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-02-26 02:05+0000\n" +"PO-Revision-Date: 2015-12-16 17:30+0000\n" +"Last-Translator: SaFi J. \n" +"Language-Team: Arabic (http://www.transifex.com/oca/OCA-web-8-0/language/ar/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ar\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:191 +#: code:addons/web_m2x_options/static/src/js/form.js:330 +#, python-format +msgid "Create \"%s\"" +msgstr "إنشاء \"%s\"" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:213 +#: code:addons/web_m2x_options/static/src/js/form.js:351 +#, python-format +msgid "Create and Edit..." +msgstr "إنشاء وتحرير ..." + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:156 +#: code:addons/web_m2x_options/static/src/js/form.js:305 +#, python-format +msgid "Search More..." +msgstr "البحث عن المزيد ..." diff --git a/web_m2x_options/i18n/de.po b/web_m2x_options/i18n/de.po new file mode 100644 index 000000000..112e2b911 --- /dev/null +++ b/web_m2x_options/i18n/de.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +# Translators: +# Rudolf Schnapka , 2016 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-02-26 02:05+0000\n" +"PO-Revision-Date: 2016-01-18 20:15+0000\n" +"Last-Translator: Rudolf Schnapka \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-web-8-0/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:191 +#: code:addons/web_m2x_options/static/src/js/form.js:330 +#, python-format +msgid "Create \"%s\"" +msgstr "Anlegen \"%s" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:213 +#: code:addons/web_m2x_options/static/src/js/form.js:351 +#, python-format +msgid "Create and Edit..." +msgstr "Anlegen und Bearbeiten" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:156 +#: code:addons/web_m2x_options/static/src/js/form.js:305 +#, python-format +msgid "Search More..." +msgstr "Suche weitere..." diff --git a/web_m2x_options/i18n/es.po b/web_m2x_options/i18n/es.po new file mode 100644 index 000000000..7a4764bae --- /dev/null +++ b/web_m2x_options/i18n/es.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +# Translators: +# Pedro M. Baeza , 2015 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-02-26 02:05+0000\n" +"PO-Revision-Date: 2015-11-07 11:28+0000\n" +"Last-Translator: Pedro M. Baeza \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-web-8-0/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:191 +#: code:addons/web_m2x_options/static/src/js/form.js:330 +#, python-format +msgid "Create \"%s\"" +msgstr "Crear \"%s\"" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:213 +#: code:addons/web_m2x_options/static/src/js/form.js:351 +#, python-format +msgid "Create and Edit..." +msgstr "Crear y editar..." + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:156 +#: code:addons/web_m2x_options/static/src/js/form.js:305 +#, python-format +msgid "Search More..." +msgstr "Buscar más..." diff --git a/web_m2x_options/i18n/fi.po b/web_m2x_options/i18n/fi.po new file mode 100644 index 000000000..9dab4ae40 --- /dev/null +++ b/web_m2x_options/i18n/fi.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +# Translators: +# Jarmo Kortetjärvi , 2016 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-02-26 02:05+0000\n" +"PO-Revision-Date: 2016-02-01 09:52+0000\n" +"Last-Translator: Jarmo Kortetjärvi \n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-web-8-0/language/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:191 +#: code:addons/web_m2x_options/static/src/js/form.js:330 +#, python-format +msgid "Create \"%s\"" +msgstr "Luo \"%s\"" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:213 +#: code:addons/web_m2x_options/static/src/js/form.js:351 +#, python-format +msgid "Create and Edit..." +msgstr "Luo ja muokkaa..." + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:156 +#: code:addons/web_m2x_options/static/src/js/form.js:305 +#, python-format +msgid "Search More..." +msgstr "Hae lisää..." diff --git a/web_m2x_options/i18n/fr.po b/web_m2x_options/i18n/fr.po new file mode 100644 index 000000000..448e0f468 --- /dev/null +++ b/web_m2x_options/i18n/fr.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +# Translators: +# Christophe CHAUVET , 2016 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-05-06 15:50+0000\n" +"PO-Revision-Date: 2016-05-06 08:27+0000\n" +"Last-Translator: Christophe CHAUVET \n" +"Language-Team: French (http://www.transifex.com/oca/OCA-web-8-0/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:191 +#: code:addons/web_m2x_options/static/src/js/form.js:330 +#, python-format +msgid "Create \"%s\"" +msgstr "Creer \"%s\"" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:213 +#: code:addons/web_m2x_options/static/src/js/form.js:351 +#, python-format +msgid "Create and Edit..." +msgstr "Créer et modifier..." + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:156 +#: code:addons/web_m2x_options/static/src/js/form.js:305 +#, python-format +msgid "Search More..." +msgstr "Rechercher plus..." diff --git a/web_m2x_options/i18n/it.po b/web_m2x_options/i18n/it.po new file mode 100644 index 000000000..ce21776ce --- /dev/null +++ b/web_m2x_options/i18n/it.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +# Translators: +# Ahmet Altınışık , 2015 +# Antonio Trueba, 2016 +# Armando Vulcano Junior , 2015 +# Carles Antoli , 2015 +# Bole , 2015 +# FIRST AUTHOR , 2012,2014 +# Giacomo , 2015 +# Hotellook, 2014 +# Jarmo Kortetjärvi , 2016 +# Paolo Valier, 2016 +# Paolo Valier, 2016 +# Rudolf Schnapka , 2016 +# Thomas A. Jaeger, 2015 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-28 07:09+0000\n" +"PO-Revision-Date: 2016-04-28 06:46+0000\n" +"Last-Translator: Paolo Valier\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-web-8-0/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:191 +#: code:addons/web_m2x_options/static/src/js/form.js:330 +#, python-format +msgid "Create \"%s\"" +msgstr "Crea \"%s\"" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:213 +#: code:addons/web_m2x_options/static/src/js/form.js:351 +#, python-format +msgid "Create and Edit..." +msgstr "Crea e Modifica..." + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:156 +#: code:addons/web_m2x_options/static/src/js/form.js:305 +#, python-format +msgid "Search More..." +msgstr "Cerca altro..." diff --git a/web_m2x_options/i18n/pt_BR.po b/web_m2x_options/i18n/pt_BR.po new file mode 100644 index 000000000..8074af4c1 --- /dev/null +++ b/web_m2x_options/i18n/pt_BR.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +# Translators: +# danimaribeiro , 2016 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-11 02:17+0000\n" +"PO-Revision-Date: 2016-03-05 16:20+0000\n" +"Last-Translator: danimaribeiro \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-web-8-0/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:191 +#: code:addons/web_m2x_options/static/src/js/form.js:330 +#, python-format +msgid "Create \"%s\"" +msgstr "Criar \"%s\"" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:213 +#: code:addons/web_m2x_options/static/src/js/form.js:351 +#, python-format +msgid "Create and Edit..." +msgstr "Criar e editar.." + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:156 +#: code:addons/web_m2x_options/static/src/js/form.js:305 +#, python-format +msgid "Search More..." +msgstr "Buscar mais..." diff --git a/web_m2x_options/i18n/sl.po b/web_m2x_options/i18n/sl.po new file mode 100644 index 000000000..c63f36ed9 --- /dev/null +++ b/web_m2x_options/i18n/sl.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-02-26 02:05+0000\n" +"PO-Revision-Date: 2015-11-08 05:46+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-web-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:191 +#: code:addons/web_m2x_options/static/src/js/form.js:330 +#, python-format +msgid "Create \"%s\"" +msgstr "Ustvari \"%s\"" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:213 +#: code:addons/web_m2x_options/static/src/js/form.js:351 +#, python-format +msgid "Create and Edit..." +msgstr "Ustvari in urejaj..." + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:156 +#: code:addons/web_m2x_options/static/src/js/form.js:305 +#, python-format +msgid "Search More..." +msgstr "Poišči več..." diff --git a/web_m2x_options/i18n/tr.po b/web_m2x_options/i18n/tr.po new file mode 100644 index 000000000..c9418f2d1 --- /dev/null +++ b/web_m2x_options/i18n/tr.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * web_m2x_options +# +# Translators: +# Ahmet Altınışık , 2015 +# Ahmet Altınışık , 2015 +msgid "" +msgstr "" +"Project-Id-Version: web (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-02-26 02:05+0000\n" +"PO-Revision-Date: 2015-12-30 21:53+0000\n" +"Last-Translator: Ahmet Altınışık \n" +"Language-Team: Turkish (http://www.transifex.com/oca/OCA-web-8-0/language/tr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: tr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:191 +#: code:addons/web_m2x_options/static/src/js/form.js:330 +#, python-format +msgid "Create \"%s\"" +msgstr "Oluştur \"%s\"" + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:213 +#: code:addons/web_m2x_options/static/src/js/form.js:351 +#, python-format +msgid "Create and Edit..." +msgstr "Oluştur ve düzenle..." + +#. module: web_m2x_options +#. openerp-web +#: code:addons/web_m2x_options/static/src/js/form.js:156 +#: code:addons/web_m2x_options/static/src/js/form.js:305 +#, python-format +msgid "Search More..." +msgstr "Daha Fazla..." diff --git a/web_m2x_options/static/src/js/form.js b/web_m2x_options/static/src/js/form.js index 7342794ea..524197a57 100644 --- a/web_m2x_options/static/src/js/form.js +++ b/web_m2x_options/static/src/js/form.js @@ -67,11 +67,11 @@ openerp.web_m2x_options = function (instance) { var self = this; // add options limit used to change number of selections record // returned. - if (_.isUndefined(this.view)) - return this._super.apply(this, arguments); - if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) { - this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']); - } + if (_.isUndefined(this.view)) + return this._super.apply(this, arguments); + if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) { + this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']); + } if (typeof this.options.limit === 'number') { this.limit = this.options.limit; @@ -99,8 +99,7 @@ openerp.web_m2x_options = function (instance) { self.build_context())); var create_rights; - if (typeof this.options.create === "undefined" || - typeof this.options.create_edit === "undefined") { + if (!(self.options && (self.options.no_create || self.options.no_create_edit))) { create_rights = new instance.web.Model(this.field.relation).call( "check_access_rights", ["create", false]); } @@ -119,7 +118,7 @@ openerp.web_m2x_options = function (instance) { id: x[0], }; }); - + // Search result value colors if (self.colors && self.field_color) { @@ -127,7 +126,7 @@ openerp.web_m2x_options = function (instance) { for (var index in values) { value_ids.push(values[index].id); } - + // RPC request to get field_color from Objects Objects.query([self.field_color]) .filter([['id', 'in', value_ids]]) @@ -137,7 +136,7 @@ openerp.web_m2x_options = function (instance) { if (values[index_value].id == objects[index].id) { // Find value in values by comparing ids var value = values[index_value]; - + // Find color with field value as key var color = self.colors[objects[index][self.field_color]] || 'black'; value.label = ''+value.label+''; @@ -171,10 +170,15 @@ openerp.web_m2x_options = function (instance) { var raw_result = _(data.result).map(function (x) { return x[1]; }); + var no_quick_create = ( + self.options && (self.options.no_create || + self.options.no_quick_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" - if ((_.isUndefined(self.options.create) && _.isUndefined(self.view.ir_options['web_m2x_options.create']) && can_create) || - (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create'] == "True") || - self.options.create) { + if (!no_quick_create && ((m2x_create_undef && can_create) || + m2x_create)) { if (search_val.length > 0 && !_.include(raw_result, search_val)) { @@ -192,10 +196,15 @@ openerp.web_m2x_options = function (instance) { } // create... + var no_create_edit = ( + self.options && (self.options.no_create || + self.options.no_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" - if ((_.isUndefined(self.options.create_edit) && _.isUndefined(self.view.ir_options['web_m2x_options.create_edit']) && can_create) || - (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create_edit'] == "True") || - self.options.create_edit) { + if (!no_create_edit && ((m2x_create_edit_undef && can_create) || + m2x_create_edit)) { values.push({ label: _t("Create and Edit..."), @@ -207,7 +216,7 @@ openerp.web_m2x_options = function (instance) { classname: 'oe_m2o_dropdown_option' }); } - + // Check if colors specified to wait for RPC if (!(self.field_color && self.colors)){ def.resolve(values); @@ -226,28 +235,28 @@ openerp.web_m2x_options = function (instance) { new instance.web.form.M2ODialog(this).open(); } }, - - start: function() { - this._super.apply(this, arguments); - return this.get_options(); - }, - get_options: function() { - var self = this; - if (_.isUndefined(this.view.ir_options_loaded)) { - this.view.ir_options_loaded = $.Deferred(); - this.view.ir_options = {}; - (new instance.web.Model("ir.config_parameter")) - .query(["key", "value"]).filter([['key', 'in', OPTIONS]]) - .all().then(function(records) { - _(records).each(function(record) { - self.view.ir_options[record.key] = record.value; - }); - self.view.ir_options_loaded.resolve(); - }); - } - return this.view.ir_options_loaded; - }, + start: function() { + this._super.apply(this, arguments); + return this.get_options(); + }, + + get_options: function() { + var self = this; + if (_.isUndefined(this.view.ir_options_loaded)) { + this.view.ir_options_loaded = $.Deferred(); + this.view.ir_options = {}; + (new instance.web.Model("ir.config_parameter")) + .query(["key", "value"]).filter([['key', 'in', OPTIONS]]) + .all().then(function(records) { + _(records).each(function(record) { + self.view.ir_options[record.key] = record.value; + }); + self.view.ir_options_loaded.resolve(); + }); + } + return this.view.ir_options_loaded; + }, /** * Call this method to search using a string. @@ -258,10 +267,10 @@ openerp.web_m2x_options = function (instance) { // add options limit used to change number of selections record // returned. - - if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) { - this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']); - } + + if (!_.isUndefined(this.view.ir_options['web_m2x_options.limit'])) { + this.limit = parseInt(this.view.ir_options['web_m2x_options.limit']); + } if (typeof this.options.limit === 'number') { this.limit = this.options.limit; @@ -300,10 +309,14 @@ openerp.web_m2x_options = function (instance) { }); } // quick create + var no_quick_create = ( + self.options && (self.options.no_create || + self.options.no_quick_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" - if ((_.isUndefined(self.options.create) && _.isUndefined(self.view.ir_options['web_m2x_options.create'])) || - (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create'] == 'True') || - self.options.create) { + if (!no_quick_create && (m2x_create_undef || m2x_create)) { var raw_result = _(data.result).map(function(x) {return x[1];}); if (search_val.length > 0 && !_.include(raw_result, search_val)) { @@ -319,10 +332,14 @@ openerp.web_m2x_options = function (instance) { } // create... + var no_create_edit = ( + self.options && (self.options.no_create || + self.options.no_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" - if ((_.isUndefined(self.options.create_edit === 'undefined') && _.isUndefined(self.view.ir_options['web_m2x_options.create_edit'])) || - (_.isUndefined(self.options.create) && self.view.ir_options['web_m2x_options.create_edit'] == 'True') || - self.options.create_edit) { + if (!no_create_edit && (m2x_create_edit_undef || m2x_create_edit)) { values.push({ label: _t("Create and Edit..."),