OCA / margin-analysis

Odoo Financial Controlling (margin, costs, ...)
https://odoo-community.org/project/9
GNU Affero General Public License v3.0
71 stars 161 forks source link

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

Closed anhvu-sg closed 5 months ago

anhvu-sg commented 8 months ago

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 commented 8 months ago

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

anhvu-sg commented 8 months ago

Could you also add a test ?

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

dreispt commented 5 months ago

/ocabot merge patch

OCA-git-bot commented 5 months ago

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 commented 5 months ago

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