Sequence Mixin

Info 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.

Features Key Features

Use Cases Use Cases / Context

Use this mixin whenever you need automatic, rule-based document numbering in a custom Odoo module:

Simply inherit mixin.sequence, configure a Sequence Template via the menu, and call _create_sequence() at the appropriate state transition.

Install Installation & Usage

  1. Clone branch 15.0 of the repository: https://github.com/simetri-sinergi-id/ssi-mixin
  2. Add the path to this repository in your Odoo configuration (addons-path).
  3. Update the module list (ensure you are in developer mode).
  4. Go to menu Apps → Apps → Main Apps.
  5. Search for Sequence Mixin and install.
  6. Go to Sequence → Templates to create your sequence templates.
  7. In your custom model, inherit mixin.sequence and call self._create_sequence() when the document number should be generated.

FAQs FAQ

Bug Tracker 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 Credits & Contributors

This module is developed and maintained by PT. Simetri Sinergi Indonesia.