summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjem-odoo <jem@openerp.com>2017-11-22 09:38:50 +0100
committerjem-odoo <jem@openerp.com>2017-12-11 11:34:10 +0100
commitb2347b682133fbc3335adf151fa5f97b819ca492 (patch)
treed83d6915154b731c17809a5e1e824057d9b59508
parent537435299be1b39d9f187f42035ac7d31a07bdce (diff)
[IMP] sale_stock: expense policy should not impact delivered qty on SOL
When making a SO with a stockable product with an expense policy set, confirming the SO will increase the delivered quantity according to the validated picking. But when unlocking and modifying the ordered quantity on picking the delivered quantity on SO does not change (it is if the product have no expense policy). So the expense policy influence the flow in a way (update validated picking) but not on the the other (confirm SO) to compute SO line delivered quantity. This commits make the expense policy not relevent when modifying ordered quantity on picking. It also prepare the cleaning to unify API of delivered quantity computation on SO line for stock and service.
-rw-r--r--addons/sale_stock/models/stock.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_stock/models/stock.py b/addons/sale_stock/models/stock.py
index 200622f8e31..8ec7ced7756 100644
--- a/addons/sale_stock/models/stock.py
+++ b/addons/sale_stock/models/stock.py
@@ -38,7 +38,7 @@ class StockMove(models.Model):
if 'product_uom_qty' in vals:
for move in self:
if move.state == 'done':
- sale_order_lines = self.filtered(lambda move: move.sale_line_id and move.product_id.expense_policy == 'no').mapped('sale_line_id')
+ sale_order_lines = self.filtered(lambda move: move.sale_line_id).mapped('sale_line_id')
for line in sale_order_lines:
line.qty_delivered = line._get_delivered_qty()
return res