[18.0][IMP] date_range: add automatic "As Of Month" cumulative date range generation#1259
Open
BhaveshHeliconia wants to merge 1 commit intoOCA:18.0from
Open
[18.0][IMP] date_range: add automatic "As Of Month" cumulative date range generation#1259BhaveshHeliconia wants to merge 1 commit intoOCA:18.0from
BhaveshHeliconia wants to merge 1 commit intoOCA:18.0from
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds automatic generation of cumulative monthly "As Of Month" date ranges to the
date_rangemodule.Changes
New "As Of Month" date range type:
date.range.typedata record (date_range_as_of_month) withallow_overlap=True, used for cumulative monthly ranges (e.g., "As Of January 2025", "As Of February 2025", etc.).Automatic generation via cron:
generate_next_years_as_of_month()method ondate.range.typethat auto-generates cumulative ranges from January 1st of the current year through each month's end, for a configurable number of years.cron_generate_next_years_as_of_month) to trigger this generation automatically.Settings configuration:
res.config.settingsmodel (res_config_settings.py) with acumulative_month_range_yearsfield (default: 5) to control how many years of ranges are generated.Manual generation guard:
UserErrorinaction_apply()of the date range generator wizard to prevent manual generation for the "As Of Month" type, since it is system-managed.Search view improvement: