mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 21:52:03 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
To use this module, you need to:
|
||||
|
||||
* Go to the form view of an `ir.sequence` record
|
||||
* Go to the Python tab
|
||||
* Enable the 'Use Python' checkbox
|
||||
* Change the default 'number' expression to something more fancy.
|
||||
|
||||
Examples:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# To separate the Odoo-generated number with hyphens eg. 0-0-0-0-1
|
||||
'-'.join(number_padded)
|
||||
|
||||
# To have an UUID as the sequence value
|
||||
uuid.uuid4().hex
|
||||
|
||||
# To use an 8-digit binary number
|
||||
'{0:#010b}'.format(number + 300)[2:]
|
||||
|
||||
And so on.
|
||||
Loading…
Add table
Add a link
Reference in a new issue