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

[16.0] sale_margin_delivery: Store percentage value as into odoo #215

Merged
merged 4 commits into from
Jun 24, 2024

Conversation

lmignon
Copy link

@lmignon lmignon commented Jun 19, 2024

Prior to this change

  • margin_percent
    100% = 1.0
    50% = 0.5

  • margin_delivered_percent
    100% = 100
    50% = 50

After

'price_reduce' is deprecated and removed into the next version. Compute
the prirce_reduct from the price_subotal / product_uom_qty. We might
be tempted to use the 'price_reduce_taxecl' field from the sale order
line but this field is rounded by default to the monetary precision.

As an additional benefit this change ensures the compatibility with
the 'sale_triple_discount' addon. Indeed, when
'sale_triple_discount' is installed, the discount field is not used
as an aggregation of all the applied discount. It's only use to store
the first discount applied. Therefore, the field is not properly
computed since it doesn't include the second and third discount.
Put all the new fields after the orginal margin fields from odoo. (prior to this change, the new fields were displayed among the margin fields from Odoo
@OCA-git-bot
Copy link
Contributor

Hi @sergio-teruel, @Shide,
some modules you are maintaining are being modified, check this out!

@lmignon
Copy link
Author

lmignon commented Jun 19, 2024

@Shide @yajo @Gelojr @fcvalgar following my comment #214 (comment)

@lmignon lmignon force-pushed the 16.0-sale-margin-percent-storage-lmi branch 2 times, most recently from c8c48cd to 68d883c Compare June 19, 2024 14:44
Copy link

@fcvalgar fcvalgar left a comment

Choose a reason for hiding this comment

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

LGTM, sorry I dont see this PR.

Thank you @lmignon

@rafaelbn rafaelbn added this to the 16.0 milestone Jun 19, 2024
@rafaelbn rafaelbn requested a review from Shide June 19, 2024 20:31
@rousseldenis
Copy link

@lmignon It seems dropshipping module should be updated too.

@lmignon lmignon force-pushed the 16.0-sale-margin-percent-storage-lmi branch from 68d883c to 9da2131 Compare June 20, 2024 06:37
@lmignon
Copy link
Author

lmignon commented Jun 20, 2024

@lmignon It seems dropshipping module should be updated too.

it's done.

@lmignon lmignon force-pushed the 16.0-sale-margin-percent-storage-lmi branch from a358e2c to 40f3658 Compare June 20, 2024 09:03
Copy link

@Shide Shide left a comment

Choose a reason for hiding this comment

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

Thanks for the awesome update! ❤️

@Shide
Copy link

Shide commented Jun 24, 2024

/ocabot merge nobump

Done with nobump because version is already updated manually

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-215-by-Shide-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Jun 24, 2024
Signed-off-by Shide
@OCA-git-bot
Copy link
Contributor

@Shide your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-215-by-Shide-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@Shide
Copy link

Shide commented Jun 24, 2024

/ocabot mege nobump

@OCA-git-bot
Copy link
Contributor

Hi @Shide. Your command failed:

Invalid command: mege.

Ocabot commands

  • ocabot merge major|minor|patch|nobump
  • ocabot rebase
  • ocabot migration {MODULE_NAME}

More information

@Shide
Copy link

Shide commented Jun 24, 2024

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-215-by-Shide-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 84f7fb6 into OCA:16.0 Jun 24, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@lmignon lmignon deleted the 16.0-sale-margin-percent-storage-lmi branch June 24, 2024 13:54
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.

8 participants