diff --git a/addons/sale_product_configurator/static/src/js/product_configurator_modal.js b/addons/sale_product_configurator/static/src/js/product_configurator_modal.js index 5b5530452fb..7d52b07b76d 100644 --- a/addons/sale_product_configurator/static/src/js/product_configurator_modal.js +++ b/addons/sale_product_configurator/static/src/js/product_configurator_modal.js @@ -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