[FIX] sale_product_configurator: remove duplicated method
Oversight of previous forward-port.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user