Sequence from Python expression
sequence_python · OCA/server-tools
Health
75/100
good
-
Security25/25No findings
-
Activity20/25Last human commit 11 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 7 Odoo series since 13.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.06 MB
Module directory on disk
Code analysis
0 migration notes
1 model
1 view
0 HTTP endpoints
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
Dependencies
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
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…