[FIX] product: don't display 'create and edit' option on many2many_tag to create variant on product_template. The quick create is confusing for users

This commit is contained in:
Christophe Matthieu 2014-08-22 14:20:14 +02:00
parent 20b302cc8c
commit b3aad9f511
2 changed files with 2 additions and 2 deletions

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>

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() {