TIP: You can type at any time to perform a new search.
Sequence from Python expression
sequence_python · OCA/server-tools
- Repository
- OCA/server-tools · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Generic Modules
- Folder size
- 0.06 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/server-tools
- Last tracking update
- 2026-08-07 09:06:27
- Authors
- Odoo Community Association (OCA), Sunflower IT
- Maintainers
- Odoo Community Association (OCA), Sunflower IT
- Committers
- Weblate, OCA-git-bot, oca-ci, bosd
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
This module allows to generate a sequence by a Python formula expression. Besides common Python functions and operators, it provides several functions like 'random' and 'uuid' in the expression, as well as variables such as the next number in the sequence. These are also listed next to the input field on the sequence form view. If you want to add more variables for use in the expression, you can extend this module. Use cases for this module could be: - You want to generate alphanumeric numbering - You want to apply some math to the number to prevent customers from knowing their place in the sequence - You want to use UUID
Code Analysis ⓘ
Views touched (1)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
sequence_view |
ir.sequence | Inherits base.sequence_view |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (1)
New fields (3)
-
python_codeTextdefault=DEFAULT_PYTHON_CODEhelp='Write Python code that generates the sequence body.'string='Python expression' -
python_code_previewCharcompute='_compute_python_code_preview' args: 'Preview' -
use_python_codeBooleandefault=Falsestring='Use Python'
-
get_next_char(self, number_next)
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…