[FIX] product_extended: time cycle

Use the field `time_cycle` for cost computation, which takes into
account the routing configuration (fixed time of computed based on
previous operations).
This commit is contained in:
Nicolas Martinelli
2017-06-02 12:20:08 +02:00
parent 7cc8420ea0
commit 46c85b4a82
+1 -1
View File
@@ -43,7 +43,7 @@ class ProductProduct(models.Model):
if bom.routing_id:
total_cost = 0.0
for order in bom.routing_id.operation_ids:
total_cost += (order.time_cycle_manual/60) * order.workcenter_id.costs_hour
total_cost += (order.time_cycle/60) * order.workcenter_id.costs_hour
price += bom.product_uom_id._compute_price(total_cost, bom.product_id.uom_id)
# Convert on product UoM quantities
if price > 0: