Merge pull request #1970 from odoo-dev/8.0-fix-dont-display-edit-product-many2many-chm

[FIX] product: don't display 'create and edit' option on many2many_tag
This commit is contained in:
Christophe Matthieu
2014-08-25 17:37:52 +02:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -245,7 +245,7 @@
<field name="attribute_line_ids" widget="one2many_list">
<tree string="Variants" editable="bottom">
<field name="attribute_id"/>
<field name="value_ids" widget="many2many_tags" domain="[('attribute_id', '=', attribute_id)]" context="{'default_attribute_id': attribute_id}"/>
<field name="value_ids" widget="many2many_tags" options="{'no_create_edit': True}" domain="[('attribute_id', '=', attribute_id)]" context="{'default_attribute_id': attribute_id}"/>
</tree>
</field>
</page>
+1 -1
View File
@@ -3356,7 +3356,7 @@ instance.web.form.CompletionFieldMixin = {
});
}
// create...
if (!(self.options && self.options.no_create)){
if (!(self.options && (self.options.no_create || self.options.no_create_edit))){
values.push({
label: _t("Create and Edit..."),
action: function() {