diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-10-15 11:40:20 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-10-15 11:40:20 +0200 |
| commit | f026255f12b98a75bcfd84b9ff3003f439e497ac (patch) | |
| tree | 92a142c51702745b2aff81cbec842879651e99ab | |
| parent | 93c22558f3691c45cb6dfe4047927a319ba1bb85 (diff) | |
| parent | 5f3739aebd9ddf157871765396f997d394ffe0d8 (diff) | |
[MERGE] forward port branch saas-14 up to 5f3739aebd9
| -rw-r--r-- | addons/product_margin/models/product_product.py | 2 | ||||
| -rw-r--r-- | addons/sale_stock/models/sale_order.py | 3 | ||||
| -rw-r--r-- | addons/website_sale/views/templates.xml | 2 |
3 files changed, 4 insertions, 3 deletions
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) diff --git a/addons/sale_stock/models/sale_order.py b/addons/sale_stock/models/sale_order.py index 0d78bdd2a80..3928f09a5ab 100644 --- a/addons/sale_stock/models/sale_order.py +++ b/addons/sale_stock/models/sale_order.py @@ -180,7 +180,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) diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index 55ed4fae05b..91735993449 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -436,7 +436,7 @@ <li t-if="variant_img" data-target="#o-carousel-product" data-slide-to="0" class="active"> <img class="img img-responsive js_variant_img_small" t-attf-src="/website/image/product.product/{{product.product_variant_id.id}}/image/90x90" t-att-alt="product.name"/> </li> - <li data-target="#o-carousel-product" t-att-data-slide-to="1 if variant_img else 0" t-att-class="'' if variant_img else 'active'"> + <li data-target="#o-carousel-product" t-att-data-slide-to="1 if variant_img else '0'" t-att-class="'' if variant_img else 'active'"> <img class="img img-responsive" t-attf-src="/website/image/product.template/{{product.id}}/image/90x90" t-att-alt="product.name"/> </li> <t t-if="len(image_ids)" t-foreach="image_ids" t-as="pimg"> |
