🚀 Odoo Quick Tip: Automating ID Sequences (Matrícula)
Efficiency is key! If you are tired of manually entering ID numbers, here is how you can set up an Auto-Increment field in Odoo using Studio and Technical Settings.
1. Create the Sequence
Go to Settings → Technical → Sequences & Identifiers → Sequences and create a new record:
Name: (e.g., Student/Employee ID)
Code: x_seq_matricula
Prefix/Padding/Step: Define your desired format (e.g., MAT-0001).
2. Enable Auto-Generation in Odoo Studio
Open the Studio tool on your desired model:
Select the field x_matricula.
Enable the "Automated" property and link it to the sequence created in Step 1.
Set it to trigger "Only if empty" to avoid overwriting existing data.
3. Secure the Data
To maintain data integrity:
Set the field to Read-Only (Solo lectura).
Ensure "No Duplicates" is checked to prevent ID collisions.
4. Advanced Automation
If you need more complex logic, head to Settings → Technical → Automation → Automation Rules to trigger the sequence based on specific record changes.
💡 Pro Tip: Always keep your last used ID (e.g., 5708) in mind when migrating data to ensure the sequence picks up exactly where you left off!
#Odoo #ERP #Automation #BusinessProcess #TechTips
1. Create the Sequence
Go to Settings → Technical → Sequences & Identifiers → Sequences and create a new record:
Name: (e.g., Student/Employee ID)
Code: x_seq_matricula
Prefix/Padding/Step: Define your desired format (e.g., MAT-0001).
2. Enable Auto-Generation in Odoo Studio
Open the Studio tool on your desired model:
Select the field x_matricula.
Enable the "Automated" property and link it to the sequence created in Step 1.
Set it to trigger "Only if empty" to avoid overwriting existing data.
3. Secure the Data
To maintain data integrity:
Set the field to Read-Only (Solo lectura).
Ensure "No Duplicates" is checked to prevent ID collisions.
4. Advanced Automation
If you need more complex logic, head to Settings → Technical → Automation → Automation Rules to trigger the sequence based on specific record changes.
💡 Pro Tip: Always keep your last used ID (e.g., 5708) in mind when migrating data to ensure the sequence picks up exactly where you left off!
#Odoo #ERP #Automation #BusinessProcess #TechTips
Categoría: Mi Post > Trabajando
Ver Perfil: OficinaRed ✔
Vistas: 11