-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
[17.0][IMP] contract: Terminate contract lines with last_date_invoiced if it is higher than terminate date from wizard #1177
[17.0][IMP] contract: Terminate contract lines with last_date_invoiced if it is higher than terminate date from wizard #1177
Conversation
self.contract_line_ids.filtered("is_stop_allowed").stop(terminate_date) | ||
for line in self.contract_line_ids.filtered("is_stop_allowed"): | ||
line.stop( | ||
max(terminate_date, line.last_date_invoiced) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sergio-teruel Tests should be welcome |
f1631c7
to
9b6b369
Compare
@carlos-lopez-tecnativa Fixed , thanks... @rousseldenis Oks.. |
…t is higher than terminate date from wizard
9b6b369
to
35852ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/ocabot merge minor |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 607f6c1. Thanks a lot for contributing to OCA. ❤️ |
cc @Tecnativa TT52602
Well, when you have a contract with some lines with diferents recurrences you can different last date invoiced values so if you try to terminate all contrat from wizard you can obtain an error because the date in the wizard is lower than the last date invoiced in the line.
With this improvement user can choose if terminate the line with last date invoiced instead if is higher than the date of the wizard.
ping @carlosdauden @carlos-lopez-tecnativa