Skip to content

Commit f4bc814

Browse files
committed
fixup! Refactor mto_route_product_variant
1 parent fd5bfac commit f4bc814

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

stock_product_variant_mto/models/product_product.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _compute_is_mto(self):
3434
product.is_mto = False
3535
continue
3636
product.is_mto = mto_route in product.product_tmpl_id.route_ids
37-
37+
3838
@api.depends("is_mto", "product_tmpl_id.route_ids")
3939
def _compute_route_ids(self):
4040
mto_route = self.env.ref("stock.route_warehouse0_mto", raise_if_not_found=False)

stock_product_variant_mto/models/product_template.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def write(self, values):
2020
templates_mto_added = template_not_mto_before & templates_mto_after
2121
templates_mto_removed = (self - template_not_mto_before) & (self - templates_mto_after)
2222
(templates_mto_added | templates_mto_removed).product_variant_ids._compute_is_mto()
23+
return res
2324

2425
@api.onchange("route_ids")
2526
def onchange_route_ids(self):

0 commit comments

Comments
 (0)