diff options
| author | Goffin Simon <sig@odoo.com> | 2017-07-31 14:32:01 +0200 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2017-08-01 09:33:06 +0200 |
| commit | abbb937607ea82a9c56cc328f6a0ca3430876948 (patch) | |
| tree | 08d626eae5c21ff13640ae159cc4e9940f3f7765 | |
| parent | 8452cc2e36b122248af865f7fa4d93ce378dab0e (diff) | |
[FIX] sale_stock: return a delivered product with a non internal location
When returning a delivered product with a non internal location,
the delivered quantity on the SO was not updated.
Steps to return a delivered product:
- Click on button "Return" on stock.picking
- Check the refund box
- Click on return
PS: for the field return location, you can choose a child location from
WH/stock. So it can be a not internal one.
opw:749610
| -rw-r--r-- | addons/sale_stock/models/sale_order.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_stock/models/sale_order.py b/addons/sale_stock/models/sale_order.py index 748ca14924c..df9838ba1f7 100644 --- a/addons/sale_stock/models/sale_order.py +++ b/addons/sale_stock/models/sale_order.py @@ -185,7 +185,7 @@ class SaleOrderLine(models.Model): if move.location_dest_id.usage == "customer": if not move.origin_returned_move_id: qty += move.product_uom._compute_quantity(move.product_uom_qty, self.product_uom) - elif move.location_dest_id.usage == "internal" and move.to_refund_so: + 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) return qty |
