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][MIG] sale_commission_partial_settlement: Migration to 16.0 #561

Open
wants to merge 11 commits into
base: 16.0
Choose a base branch
from

Conversation

dalonsofl
Copy link

@dalonsofl dalonsofl commented Sep 11, 2024

Migration from version 14.0 to 16.0

@dalonsofl dalonsofl changed the title 16.0 mig sale commission partial settlement [16.0][MIG] sale commission partial settlement: Migration to 16.0 Sep 11, 2024
@dalonsofl dalonsofl force-pushed the 16.0-mig-sale_commission_partial_settlement branch 4 times, most recently from ab8191b to 3ae3861 Compare September 13, 2024 07:58
@dalonsofl dalonsofl mentioned this pull request Sep 13, 2024
12 tasks
@dalonsofl dalonsofl changed the title [16.0][MIG] sale commission partial settlement: Migration to 16.0 [16.0][MIG] sale_commission_partial_settlement: Migration to 16.0 Sep 13, 2024
Copy link

@odooNextev odooNextev 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

Copy link

@amarcosg amarcosg left a comment

Choose a reason for hiding this comment

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

Code review LGTM!

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link

@Daniel-Melian Daniel-Melian left a comment

Choose a reason for hiding this comment

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

I have functionally reviewed the addon and identified an unexpected behavior regarding commission recalculation.

When using the "Full Amount" payment amount type, if a commission is already generated and subsequently deleted, re-triggering the settlement generates the commission again as expected.
However, with the "Paid Amount" type, the process differs: you need to first break the reconciliation between the payments and the invoice, then re-reconcile them to allow the commission to be generated once more.
This inconsistency between the "Full Amount" and "Paid Amount" processes may lead to unexpected results and could cause workflow disruptions.

Steps to Reproduce:

Use the "Full Amount" type to generate a commission, delete it, and observe the behavior on re-triggering the settlement.
Use the "Paid Amount" type, generate a commission, delete it, and note that reconciliation must be broken and re-established before the commission can be regenerated.

@francesco-ooops
Copy link
Contributor

@Daniel-Melian we've identified the same issue in these days, we're working on a fix that you can then fw-port to 16

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.

Please include this fix: #575

@rousseldenis
Copy link

/ocabot migration sale_commission_partial_settlement

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Nov 19, 2024
@dalonsofl
Copy link
Author

Hi @francesco-ooops @Daniel-Melian !

I have made the changes related to the fix you mentioned, if you can check that everything is correct.

Thanks!

Regards

Copy link

@Daniel-Melian Daniel-Melian left a comment

Choose a reason for hiding this comment

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

@dalonsofl I have reviewed the changes, and indeed it is now regenerating correctly.

Thanks!

@SirAionTech
Copy link

@dalonsofl I am seeing some strange conflicts when rebasing this branch locally on 16.0, and also looks like some commits are repeated, like 42e9914 and bf48b2f.
Could you please check? Thanks!

@francesco-ooops
Copy link
Contributor

@dalonsofl can you remove the extra modules from this PR?

@dalonsofl dalonsofl force-pushed the 16.0-mig-sale_commission_partial_settlement branch 2 times, most recently from 62e5667 to a3b8eb5 Compare December 18, 2024 16:36
@dalonsofl
Copy link
Author

Hi @francesco-ooops @SirAionTech !

I think it should be resolved by now.

Regards

@francesco-ooops
Copy link
Contributor

@dalonsofl I don't think it's correct to include the fix applied in #575 in the migration commit, wdyt @SirAionTech ?

@dalonsofl dalonsofl force-pushed the 16.0-mig-sale_commission_partial_settlement branch from a3b8eb5 to 3eca214 Compare December 18, 2024 17:12
@SirAionTech
Copy link

@dalonsofl I don't think it's correct to include the fix applied in #575 in the migration commit, wdyt @SirAionTech ?

I haven't looked at the new code yet, so I can only say that generally the migration commit should only contain what is needed for the old module to work in the new version.

@dalonsofl
Copy link
Author

@dalonsofl I don't think it's correct to include the fix applied in #575 in the migration commit, wdyt @SirAionTech ?

I haven't looked at the new code yet, so I can only say that generally the migration commit should only contain what is needed for the old module to work in the new version.

So, because this reason, it makes sense the fixed applied in #575 is in the migration commit because it is necessary for worlking properly, isn't it?

@francesco-ooops
Copy link
Contributor

francesco-ooops commented Dec 19, 2024 via email

@SirAionTech
Copy link

@dalonsofl I don't think it's correct to include the fix applied in #575 in the migration commit, wdyt @SirAionTech ?

I haven't looked at the new code yet, so I can only say that generally the migration commit should only contain what is needed for the old module to work in the new version.

So, because this reason, it makes sense the fixed applied in #575 is in the migration commit because it is necessary for worlking properly, isn't it?

No because the fix in #575 is not needed for the module to work in 16.0: it is needed for the module to work in general, and has been implemented when the module was in 14.0.

A migration from 14.0 to 16.0 should have:

The full description of what should be done, and how, is in https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0.

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.