-
Notifications
You must be signed in to change notification settings - Fork 97
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
[16.0][IMP] shopinvader_product: main variant: add hooks #1524
[16.0][IMP] shopinvader_product: main variant: add hooks #1524
Conversation
@marielejeune can you please review this #1529 and fwd port here instead? |
2561e0b
to
73ad7bb
Compare
70e1be3
to
5e3cbd7
Compare
# NOTE: if the order is changed by adding `asc/desc` this can be broken | ||
# but it's very unlikely that the default order for product.product | ||
# will be changed. | ||
order_by = [x.strip() for x in self.env["product.product"]._order.split(",")] |
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.
order_by
used to be the same as the one used to compute fields_to_read
. I'm a bit lost, but shouldn't we keep this consistency ? @simahawk ?
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.
You would like to extract the compute of order_by
from _get_main_product_read_fields
into a new hook to re-use it here into _get_main_product_sorted_variants
right?
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.
If necessary, yes.
5e3cbd7
to
aca445c
Compare
It seems that there is a problem with Codecov but I cannot rerun the job. |
/ocabot rebase |
/ocabot merge patch |
On my way to merge this fine PR! |
Congratulations, your PR was merged at a270497. Thanks a lot for contributing to shopinvader. ❤️ |
Forward-port of #1529