Description
Sequence Mixin is a core mixin module in the @simetri-sinergi-id/ssi-mixin technology suite for Odoo 15. It provides a configurable, reusable document-numbering framework that can be mixed into any transactional model to automatically generate document numbers (codes) based on flexible criteria and sequence templates.
The module ships two main components:
sequence.template — a master-data record that maps a model
and a set of applicability criteria (Python expression or domain
filter) to an ir.sequence with optional custom
prefix/suffix computation; and mixin.sequence — an abstract
mixin that adds _create_sequence() to auto-select the
applicable template and apply the generated number to the
configured field.
Key Features
ir.sequence or a Python expression to pick the sequence.ir.sequence so date-based reset periods work correctly.mixin.sequence in any model to get the full capability.
Use Cases / Context
Use this mixin whenever you need automatic, rule-based document numbering in a custom Odoo module:
SO/2025/001 with date-based reset.Simply inherit mixin.sequence, configure a Sequence Template via the menu, and call _create_sequence() at the appropriate state transition.
Installation & Usage
addons-path).mixin.sequence and call self._create_sequence() when the document number should be generated.
FAQ
sequence order; the first matching one wins.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smash it by providing detailed and welcomed feedback.
Credits & Contributors
This module is developed and maintained by PT. Simetri Sinergi Indonesia.