Skip to content

[IMP] sequence_reset_period: document date range prerequisite - #1328

Open
yuvnagra-sudo wants to merge 1 commit into
OCA:18.0from
yuvnagra-sudo:imp-sequence-reset-period-docs
Open

[IMP] sequence_reset_period: document date range prerequisite#1328
yuvnagra-sudo wants to merge 1 commit into
OCA:18.0from
yuvnagra-sudo:imp-sequence-reset-period-docs

Conversation

@yuvnagra-sudo

Copy link
Copy Markdown

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_seq is only called by core when no existing subsequence
covers 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.md says 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 to
    clear 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_to and _create_date_range_seq in
models/ir_sequence.py.

Targeting 18.0. Happy to port to 17.0 and 19.0 once this is agreed. 16.0 still
uses the .rst fragments and would need a separate PR.

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.
@OCA-git-bot OCA-git-bot added series:18.0 mod:sequence_reset_period Module sequence_reset_period labels Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:sequence_reset_period Module sequence_reset_period series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants