mirror of https://github.com/OCA/web.git
[FIX] web_widget_one2many_product_picker: Subtotal with discounts
parent
6c24400709
commit
890595e446
|
@ -96,7 +96,7 @@ odoo.define("web_widget_one2many_product_picker.FieldOne2ManyProductPicker", fun
|
||||||
var prices = [];
|
var prices = [];
|
||||||
var field_map = this.options.field_map;
|
var field_map = this.options.field_map;
|
||||||
var records = this.parent_controller.model.get(this.state.id).data[this.name].data;
|
var records = this.parent_controller.model.get(this.state.id).data[this.name].data;
|
||||||
if (this.options.show_discounts) {
|
if (this.options.show_discount) {
|
||||||
prices = _.map(records, function (line) {
|
prices = _.map(records, function (line) {
|
||||||
return line.data[field_map.product_uom_qty] * tools.priceReduce(line.data[field_map.price_unit], line.data[field_map.discount]);
|
return line.data[field_map.product_uom_qty] * tools.priceReduce(line.data[field_map.price_unit], line.data[field_map.discount]);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue