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

[FIX] use lst_price for _compute_margin in product.product #193

Conversation

anhvu-sg
Copy link
Member

@anhvu-sg anhvu-sg commented Jan 4, 2024

The margin calculation functions correctly for products without variants.
However, there is an issue with the calculation for products that have variants.

Screenshot at Jan 03 10-36-00

Expected behavior

Screenshot at Jan 03 10-35-39

@OCA-git-bot
Copy link
Contributor

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

@anhvu-sg anhvu-sg force-pushed the 16.0-product_standard_margin-bug-product-variants branch from 8101091 to 990ba8f Compare January 4, 2024 05:11
Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

Hi @anhvu-sg . thanks a lot for sharing this bugfix.

Could you also add a test ?

Thanks.

@@ -5,7 +5,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Product Margin and Margin Rate",
"version": "16.0.1.0.1",
"version": "16.0.1.0.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is unncessary. Will be done automatically, once merged.

Copy link
Member Author

Choose a reason for hiding this comment

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

@anhvu-sg anhvu-sg force-pushed the 16.0-product_standard_margin-bug-product-variants branch from 990ba8f to 137e3e5 Compare January 5, 2024 04:01
@anhvu-sg
Copy link
Member Author

anhvu-sg commented Jan 5, 2024

Could you also add a test ?

@legalsylvain, I've made the necessary updates. Could you please review it?

Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

Thanks !

@dreispt
Copy link
Member

dreispt commented Apr 6, 2024

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-193-by-dreispt-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 6d71cd0 into OCA:16.0 Apr 6, 2024
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 43d07fb. 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.

4 participants