[12.0][FIX] use the new methods for next period calculation result of the refactoring in #434 to consider the recurring_invoicing_type for monthlylastday mode and clean code - #439
Conversation
|
@sbejaoui is this a fix or an improvement? If this is a fix, could you add, as first commit, a failing test that reveals the error, then as a second commit, the fix, then as subsequent commits other improvements? That will facilitate review a lot. Thanks! |
This comment has been minimized.
This comment has been minimized.
2edb4f1 to
eda0823
Compare
use the new methods for next period calculation result of the refactoring in OCA#434 to consider the recurring_invoicing_type for monthlylastday mode and clean code
eda0823 to
f160b68
Compare
| ) | ||
| period_date_start, period_date_end, recurring_next_date = ( | ||
| period_dates | ||
| ): |
There was a problem hiding this comment.
I think this can be simplified by first initializing recurring_next_date = rec.recurring_next_date; period_date_end = rec.next_period_date_end; period_date_start = rec.next_period_date_start and then removing if rec.recurring_next_date and moving that test in the while condition. This is not blocking for this PR and can be done in a follow-up.
|
@gva-acsone, can you test and review this |
|
This PR has the |
|
/ocabot merge patch |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at c97b4a9. Thanks a lot for contributing to OCA. ❤️ |
Syncing from upstream OCA/contract (15.0)
After the #434, the invoicing type (pre-paid and post-paid) became relevant for monthly last day mode. This PR fix the invoice date for the forecast of this recurring mode.