From 2ebb327a9a2942204b37d596dba34de0bc6fae4b Mon Sep 17 00:00:00 2001 From: "Nasreddin (bon)" Date: Thu, 25 Mar 2021 13:30:12 +0000 Subject: [PATCH] [FIX] sale: allow select any product combination Issue - Install 'Sale', 'Inventory' and 'Sale Product Configurator' module - Create a product X with the following attributes: attr1 : val1, val2 attr2 : val3, val4 - Click on 'Configure Variant' - Select val3 and add exclude for val1 - Select val4 and add exclude for val2 - Go to 'Sales' and create a 'Sale Order' - Select product X (a wizard should open) Can't change option combinaison. Cause Options combinaison (that are not allowed) are disabled. This commit introduce the error: https://github.com/odoo/odoo/commit/6150311b72089e3fbae6bc27551bc7f4792e68dd Solution revert commit. opw-2478854 closes odoo/odoo#68401 X-original-commit: 0a92706cd0d38d33a399bec7b5b5fbe7ab7f8576 Signed-off-by: Nicolas Lempereur (nle) Signed-off-by: bon-odoo --- addons/sale/static/src/js/variant_mixin.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/sale/static/src/js/variant_mixin.js b/addons/sale/static/src/js/variant_mixin.js index 07cb866ea71..b24e0819d92 100644 --- a/addons/sale/static/src/js/variant_mixin.js +++ b/addons/sale/static/src/js/variant_mixin.js @@ -341,7 +341,6 @@ var VariantMixin = { $parent .find('option, input, label') .removeClass('css_not_available') - .prop('disabled', false) .attr('title', function () { return $(this).data('value_name') || ''; }) .data('excluded-by', ''); @@ -414,7 +413,6 @@ var VariantMixin = { .find('option[value=' + attributeValueId + '], input[value=' + attributeValueId + ']'); $input.addClass('css_not_available'); $input.closest('label').addClass('css_not_available'); - $input.prop('disabled', true); if (excludedBy && attributeNames) { var $target = $input.is('option') ? $input : $input.closest('label').add($input);