[IMP] sequence_reset_period: document date range prerequisite - #1328
Open
yuvnagra-sudo wants to merge 1 commit into
Open
[IMP] sequence_reset_period: document date range prerequisite#1328yuvnagra-sudo wants to merge 1 commit into
yuvnagra-sudo wants to merge 1 commit into
Conversation
The readme did not explain that Range Reset only takes effect when no existing subsequence covers the current date. A sequence that already carries a 1 January to 31 December range keeps using that range, so the numbering never resets and the module looks broken rather than dormant. Document the setup steps, the existing-subsequence prerequisite, the range boundaries per period and the trimming applied against neighbouring subsequences.
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.
The readme for this module does not explain the one thing that stops it from
working, so a correctly configured sequence looks broken.
_create_date_range_seqis only called by core when no existing subsequencecovers the current date (
odoo/addons/base/models/ir_sequence.py,_next).Setting Range Reset does not touch the subsequences already on the record,
so a sequence that still carries a 1 January to 31 December range keeps drawing
from that range and the numbering never resets. Nothing in
USAGE.mdsays so,and the field is also hidden until Use subsequences per date_range is
ticked, which the readme does not mention either.
This PR is documentation only, no code change.
DESCRIPTION.md: name the option the module adds.USAGE.md: setup steps, the existing-subsequence prerequisite and how toclear it, the range boundaries produced per period, and the trimming applied
against neighbouring subsequences.
CONTRIBUTORS.md: add the contributor.The range boundaries and trimming behaviour are taken from
_compute_date_from_toand_create_date_range_seqinmodels/ir_sequence.py.Targeting 18.0. Happy to port to 17.0 and 19.0 once this is agreed. 16.0 still
uses the
.rstfragments and would need a separate PR.