From 3df584f5a68ec61a719dc34b59028e9a4c230edf Mon Sep 17 00:00:00 2001 From: Joseph Caburnay Date: Tue, 9 Oct 2018 13:24:01 +0200 Subject: [PATCH 1/3] [FIX] website_sale: click first image in carousel does not work - Activate the `group_website_multiimage` in the website settings - Add several images on a product - On the eCommerce, click on the second image, then the first one The click on the first image doesn't work. This is because `t-att-data-slide-to="0"` is removed from the attributes (probably because evaluated as falsy). opw-1884368 Co-authored-by: Nicolas Martinelli --- addons/website_sale/views/templates.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index 2f576530b88..858d2d3427b 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -428,7 +428,7 @@
  • -
  • +
  • From 0b414cb8145381cd8a3946aae9cec1601b111238 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Fri, 12 Oct 2018 09:00:24 +0200 Subject: [PATCH 2/3] [FIX] sale_stock: return of return and delivered quantity The code ignored return of return when computing the delivered quantity of a so line (in this part of the code, if a move has a destination location set a customer, it'd be a return of return of a delivery). We now update the delivered quantity is the return of return as the `to_refund` flag enabled, meaning the user ticked the option to update the quantity on the so line. opw-1884683 --- addons/sale_stock/models/sale_order.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/sale_stock/models/sale_order.py b/addons/sale_stock/models/sale_order.py index 64d4398cba1..b87ead381f0 100644 --- a/addons/sale_stock/models/sale_order.py +++ b/addons/sale_stock/models/sale_order.py @@ -181,7 +181,8 @@ class SaleOrderLine(models.Model): qty = 0.0 for move in self.procurement_ids.mapped('move_ids').filtered(lambda r: r.state == 'done' and not r.scrapped): if move.location_dest_id.usage == "customer": - if not move.origin_returned_move_id: + # FORWARD-PORT NOTICE: "to_refund_so" to rename to "to_refund" in v11 + if not move.origin_returned_move_id or (move.origin_returned_move_id and move.to_refund_so): qty += move.product_uom._compute_quantity(move.product_uom_qty, self.product_uom) elif move.location_dest_id.usage != "customer" and move.to_refund_so: qty -= move.product_uom._compute_quantity(move.product_uom_qty, self.product_uom) From 8fb61cd8305e2e5c580c4060068cbb7ddc683d70 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Fri, 12 Oct 2018 11:17:40 +0200 Subject: [PATCH 3/3] [FIX] product_margin: sales and purchase in invoice's currency Invoice price should be adapted to the invoice currency Before this commit, it was not. OPW 1889997 closes #27710 --- addons/product_margin/models/product_product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product_margin/models/product_product.py b/addons/product_margin/models/product_product.py index 8911e3bc716..dda0a0ef2dd 100644 --- a/addons/product_margin/models/product_product.py +++ b/addons/product_margin/models/product_product.py @@ -106,7 +106,7 @@ class ProductProduct(models.Model): select sum(l.price_unit * l.quantity)/nullif(sum(l.quantity),0) as avg_unit_price, sum(l.quantity) as num_qty, - sum(l.quantity * (l.price_subtotal/(nullif(l.quantity,0)))) as total, + sum(l.quantity * (l.price_subtotal_signed/(nullif(l.quantity,0)))) as total, sum(l.quantity * pt.list_price) as sale_expected from account_invoice_line l left join account_invoice i on (l.invoice_id = i.id)