Closed edlopen closed 4 months ago
@chienandalu wanna review this one?
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). 🤖
Can you check it functionally @fcvalgar? Thanks!
Hi @fcvalgar , I've reviewed the two day difference that you commented. It is kind of a bummer because it seems that is missing the first and the last day and it lead us to misunderstood of what the problem really is.
I'll try to not enter too much in the details but this is a matter of decimal precision in the quantities.
In your case you are prorrating for the last 236 days in the year. If the quantity of a year is 1, our prorrated quantity should be 0.646575(...) years but in the invoice line will store only 0.64 which is that value rounded to two decimals. That lead us to $24 difference. So a membership that cost $1 a day make us think that we are missing the starting and ending date but, sadly, not.
To sum up, the difference that you notice is a precission error in the prorrate calculation. Because this is a migration I would consider that this PR is ok to merge but the roadmap will be updated to cover this issue later on.
I have a couple of ideas of how make this run propelly but I feel that is out of the scope of this PR.
Also, what do you think @EmilioPascual ?
I think it's worth it to record your discoveries in the module's roadmap/known issues.
Perhaps error is in the rounding in this line https://github.com/OCA/vertical-association/blob/16.0/membership_prorate/models/account_move_line.py#L37, but it's in another module. Anyway migration is ok.
@rafaelbn this PR is ok to merge. We've all agreed on this migration to move on. Thank you!
/ocabot migration membership_prorate_variable_period
The migration issue (#131) has not been updated to reference the current pull request because a previous pull request (#167) is not closed. Perhaps you should check that there is no duplicate work. CC @edlopen
@EmilioPascual @edlopen about this:
Perhaps error is in the rounding in this line https://github.com/OCA/vertical-association/blob/16.0/membership_prorate/models/account_move_line.py#L37, but it's in another module. Anyway migration is ok.
Please open an issue in githug and a subtas in our side.
thank you! 😄 You are awesome!
/ocabot migration patch
/ocabot merge patch
Hey, thanks for contributing! Proceeding to merge this for you. Prepared branch 16.0-ocabot-merge-pr-168-by-rafaelbn-bump-patch, awaiting test results.
Congratulations, your PR was merged at aacfeff86fa7f3cb351d453be01a5a8f00b77c9d. Thanks a lot for contributing to OCA. ❤️
Standard migration to 16.0
@moduon MT-1833
@yajo @EmilioPascual @Shide @rafaelbn review this PR when you can. Thank you!