-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
[FIX][16.0][contract] Fix issue on last_date_invoice contract line #1124
base: 16.0
Are you sure you want to change the base?
Conversation
Co-authored-by: Denis Roussel (ACSONE) <[email protected]>
Thanks @MTantin for taking care of this issue. One of my customer experiences the same having a section and then a product line. Please find below the output of generating the 3 next invoices for a contract post-paid every year starting on the 12th of Feb 2023, both on runboat without your fix and with your fix : First invoice (in 2024) lines are correct : On second invoice (in 2026) end dates are correct but start dates are different on every line : On third invoice (in 2027), the 2 first lines are correct, the start_date on the 3rd is not : With your fix : However, dates on lines are correct every time : So it is better on lines, but there is still an issue on both last_date_invoiced and recurring_next_date and therefore on next invoice to be generated. |
@remi-filament Yeah, i noticed some bugs coming from my fix over the different tests of the addon. |
Hi @MTantin , we worked on trying to find a solution for the above problem.
Let us know if you have time to review it, or if you prefer that we start another PR on OCA including your changes ? @pedrobaeza you may want to have a look at that one since you introduced the recurrency.mixin in v13 migration (with cd086dd) ? |
…cies [FIX] fix compute next period date end dependencies
Hi @remi-filament , i've merged your commit without tests on my side, i've no time for that right now. |
Module
contract
Describe the bug
On multiline reccuring contract, the contract line last_date_invoice field is correct on the first line and is shift by 1 period time on the others lines (verified in database). This issue generate visible bug only when #START keywork is used in line note.
To Reproduce
Expected behavior
Have correct date in #START and #END keywords of line notes
Correction
The bug came from
_update_recurring_next_date
method. This method is usingnext_period_date_end
field to filllast_date_invoiced
field butlast_date_invoiced
is used to recomputerecurring_next_date
of contract and impactnext_period_date_end
. So the first line is correctly edited but the next line use the newrecurring_next_date
and it create a shift for the next lines.I keep the older mechanism of
_update_recurring_next_date
withoutinvoicing_date
and i've add a new mechanism with a specifiedinvoicing_date
to use the actual invoicing date.