[FIX] sale, website_sale: move #buy_now disable

Some code was not correctly merged during forward port.

commit introducing the new method
https://github.com/odoo/odoo/commit/51ef8514eaddaebbdfee73230cfe955735d02f67

commit introducing the issue:
https://github.com/odoo/odoo/commit/71a50a2214748fec413c5a0f042d0e7172ae6ea9
This commit is contained in:
fja-odoo
2019-06-07 11:16:20 +02:00
committed by Jeremy Kersten
parent 83f0bc2280
commit 5ab24668f4
2 changed files with 1 additions and 1 deletions
@@ -403,7 +403,6 @@ var VariantMixin = {
);
});
});
$parent.find("#buy_now").toggleClass('disabled', disable);
},
/**
* Extracted to a method to be extendable by other modules
@@ -698,6 +698,7 @@ publicWidget.registry.WebsiteSale = publicWidget.Widget.extend(VariantMixin, {
_toggleDisable: function ($parent, isCombinationPossible) {
VariantMixin._toggleDisable.apply(this, arguments);
$parent.find("#add_to_cart").toggleClass('disabled', !isCombinationPossible);
$parent.find("#buy_now").toggleClass('disabled', !isCombinationPossible);
},
/**
* Write the properties of the form elements in the DOM to prevent the