-
-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[18.0][MIG] product_variant_route_mto: Migration to 18.0 #1879
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] product_variant_route_mto: Migration to 18.0 #1879
Conversation
Define route_ids as computed on the product variant, in order to reuse route_ids from its template and add or remove MTO route according to the setting on the variant. In case MTO route is changed on the template, it must reset any variant specific setting.
"stock.route", | ||
compute="_compute_route_ids", | ||
domain="[('product_selectable', '=', True)]", | ||
store=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we do not want to store this field and must define a search function instead.
The goal with this field is to use the route_ids
from the template - plus/minus the MTO route depending on the setting of the variant - when reading/searching on the product variant. By storing this, the route_ids from the template will not be used anymore, with the possibility to have inconsistencies between product and template as the product variant routes will not reflect anymore the routes from the template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please point the open PR in v14 fixing this so that it can be ported once finished
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting fix on v14
OCA/stock-logistics-workflow
toOCA/product-attribute
, rename itproduct_variant_route_mto
route_ids
stored=True
because this code made errorNon-stored field product.product.route_ids cannot be searched.