[FIX] sale_product_configurator: remove duplicated method

Oversight of previous forward-port.
This commit is contained in:
Christophe Simonis
2019-06-04 14:56:19 +00:00
parent 2b0118b984
commit 3a1bb663c7
@@ -153,25 +153,6 @@ var OptionalProductsModal = Dialog.extend(ServicesMixin, VariantMixin, {
// Public
//--------------------------------------------------------------------------
/**
* Computes and updates the total price, useful when a product is added or
* when the quantity is changed.
* TODO awa: add a container context to avoid global selectors ?
*/
computePriceTotal: function () {
if ($('.js_price_total').length) {
var price = 0;
$('.js_product.in_cart').each(function () {
var quantity = parseInt($('input[name="add_qty"]').first().val());
price += parseFloat($(this).find('.js_raw_price').html()) * quantity;
});
$('.js_price_total .oe_currency_value').html(
this._priceToStr(parseFloat(price))
);
}
VariantMixin.computePriceTotal.apply(this, arguments);
},
/**
* Returns the list of selected products.
* The root product is added on top of the list.
@@ -457,7 +438,7 @@ var OptionalProductsModal = Dialog.extend(ServicesMixin, VariantMixin, {
VariantMixin._onChangeCombination.apply(this, arguments);
this.computePriceTotal();
this._computePriceTotal();
},
/**
* When the quantity of the root product is updated, we need to update