Skip to content
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

[14.0][IMP][FIX] website_sale_product_assortment: handle multiple assortments #838

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

aleuffre
Copy link

@aleuffre aleuffre commented Sep 6, 2023

This commit changes the way multiple assortments are handled and fixes a couple of bugs in the process.

The current version of the module is not able to handle multiple assortments, especially ones that are exclusive (e.g. one assortment with all consumable products and one with all services) and the module seemingly breaks, ignoring the selected rule (e.g. no_show)

With these changes, that behaviour is fixed, and additionally assortments for the same website and partner are merged in a logical OR.

@OCA-git-bot
Copy link
Contributor

Hi @CarlosRoca13,
some modules you are maintaining are being modified, check this out!

@aleuffre aleuffre force-pushed the 14.0-assortment-fix branch 4 times, most recently from b84e956 to c77c157 Compare September 6, 2023 15:14
@aleuffre
Copy link
Author

aleuffre commented Sep 6, 2023

Failing CI is due to another issue that I'm fixing here: #839

Copy link
Contributor

@francesco-ooops francesco-ooops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional ok!

@francesco-ooops
Copy link
Contributor

@CarlosRoca13 what do you think of this one?

Copy link
Contributor

@CarlosRoca13 CarlosRoca13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and functional review 👍

Thanks!

@pedrobaeza pedrobaeza added this to the 14.0 milestone Sep 7, 2023
assortment = assortments[0]
res["message_unavailable"] = assortment.message_unavailable
res["assortment_information"] = assortment.assortment_information

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't add empty lines inside a method.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@aleuffre aleuffre force-pushed the 14.0-assortment-fix branch 2 times, most recently from 8c88f00 to 4213656 Compare September 7, 2023 07:25
This commit changes the way multiple assortments are handled and fixes a
couple of bugs in the process.

The current version of the module is not able to handle multiple
assortments, especially ones that are exclusive (e.g. one assortment
with all consumable products and one with all services) and the module
seemingly breaks, ignoring the selected rule (e.g. no_show)

With these changes, that behaviour is fixed, and additionally
assortments for the same website and partner and merged in a logical OR.
@pedrobaeza
Copy link
Member

Thanks for the fix and the regression tests:

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-838-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit f012f4d into OCA:14.0 Sep 7, 2023
6 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 49f9443. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants