Skip to content

[19.0][IMP] maintenance_plan: align next_maintenance_date with genera… - #593

Open
samirGuesmi wants to merge 1 commit into
OCA:19.0from
acsone:19.0-maintenance_plan-imp-sgu
Open

samirGuesmi wants to merge 1 commit into
OCA:19.0from
acsone:19.0-maintenance_plan-imp-sgu

Conversation

@samirGuesmi

@samirGuesmi samirGuesmi commented Sep 10, 2026

Copy link
Copy Markdown
Member

align next_maintenance_date with generated requests

_compute_next_maintenance and _create_new_request computed the next date separately, which could cause inconsistencies.

Centralize the logic in maintenance.plan with _get_next_maintenance_date(). Recompute when a request stage changes.
Skip past occurrences and use the first date on or after today.

…ted requests

_compute_next_maintenance and _create_new_request computed the next date separately, which could cause inconsistencies.

Centralize the logic in maintenance.plan with _get_next_maintenance_date().
Recompute when a request stage changes.
Skip past occurrences and use the first date on or after today.
@samirGuesmi

Copy link
Copy Markdown
Member Author

@yvaucher

@AnizR AnizR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code LGTM

  • the refactor makes it a bit easier to read

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants