From 7e2628aeb2d525d00f457fe979c34860f13db727 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 10 Dec 2015 16:29:19 +0100 Subject: [PATCH] [FIX] web: Can't save a x2m in list editable if contains a m2m_tags with a color field m2m_tags in list editable view try to get color on validation, the field is invalid because the mutex is pending. Fix: use internal_set_value (don't re-rendering) Issue: steps to reproduce: - Create a new instance, install "sale" - Create a product "prepayment", service, invoice on ordered qties - Create aproduct "project phase", service, invoice on delivered qties, manually track delivered qties - Create a SO with once prepayment, and twice a line with "project phase". ( the name (description) of the lines should be "phase 1" and "phase 2" ) - Create invoice => The prepayment is invoiced - Go back to the SO, try to change the delivered qties of the first phase to 1 - Save => error, odoo doesn't let you save. --- addons/web/static/src/js/views/form_relational_widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js index 7c3048ee24b..d8af3b6fd23 100644 --- a/addons/web/static/src/js/views/form_relational_widgets.js +++ b/addons/web/static/src/js/views/form_relational_widgets.js @@ -969,7 +969,7 @@ var X2ManyListView = ListView.extend({ var valid = _.every(cached_records, function(record){ _.each(fields, function(field){ var value = record.values[field.name]; - field.set_value(_.isArray(value) && _.isArray(value[0]) ? [COMMANDS.delete_all()].concat(value) : value); + field.internal_set_value(_.isArray(value) && _.isArray(value[0]) ? [COMMANDS.delete_all()].concat(value) : value); }); return _.every(fields, function(field){ field.process_modifiers();