[FIX] sale_stock: uses line route or category route

Commit 2408bef fixed the way a sale order line is considered as mto or
not but did not took the line route or product category route into account.

closes odoo/odoo#36064

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
William Henrotin
2019-08-29 08:02:48 +00:00
parent 4670991d5b
commit 3b0cc4861a
+1 -1
View File
@@ -286,7 +286,7 @@ class SaleOrderLine(models.Model):
# if route MTO not found in ir_model_data, we treat the product as in MTS
pass
if mto_route and mto_route in product.route_ids:
if mto_route and mto_route in product_routes:
line.is_mto = True
else:
line.is_mto = False