How create or use sequence #22
Replies: 2 comments
-
How to create a sequence, assign to a model and show text generated by the sequence in a form viewFor this example, I used two models:
"Where i will add a new field to select one sequence from ir.sequence (settings/technical/sequences)"
"The form view contains a valid button, I will overwrite its action and add more validations, and that will be where I use a method to get the text generated for the sequence object and saved into another field (Char) of stock.picking record." Note: When the text is generated by a method it increments the count by itself. Now look at the steps below:
Model View Result
Result The field called "Correlativo de ubicación" after the field "Ubicacion de origen"
What part of the code that really matter is the below: Explanation:
Result The correlative result: |
Beta Was this translation helpful? Give feedback.
-
|
sequence.get_next_char(sequence.number_next_actual) -> For get the next prefix and number without incresease de sequence is like to return a preview of the next char |
Beta Was this translation helpful? Give feedback.












Uh oh!
There was an error while loading. Please reload this page.
-
I will explain some tips and step that i found to create a custom sequence and use it
Beta Was this translation helpful? Give feedback.
All reactions