How to Change Sequence Number in Odoo 18 Sale Order | Odoo 18 Sales Tutorials | Odoo 18 New Features
Changing Sequence Numbers in Odoo 18
Understanding Sequences in Odoo
In Odoo, sequences are used to generate unique identifiers for records. These identifiers are often displayed as reference numbers, such as invoice numbers, purchase order numbers, or customer numbers.
Methods to Change Sequence Numbers
There are primarily two ways to change sequence numbers in Odoo 18:
1. Modifying Existing Sequences:
Navigate to Settings: Go to the Settings app.
Open Sequences: Search for "Sequences" in the search bar and open the corresponding menu.
Find the Sequence: Locate the sequence you want to modify (e.g., invoice sequence, sales order sequence).
Edit the Sequence: Click on the sequence to open its details.
Adjust Settings:
Prefix: Change the prefix to modify the initial part of the sequence number.
Suffix: Change the suffix to modify the ending part of the sequence number.
Padding: Adjust the number of digits in the sequence number.
Number Next: Manually set the next number in the sequence.
Save Changes: Click the "Save" button to apply the changes.
2. Creating New Sequences:
Create a New Sequence: In the Sequences menu, click "Create."
Define Sequence Details:
Name: Give the sequence a descriptive name.
Code: Assign a unique code to the sequence.
Prefix: Set the prefix for the sequence numbers.
Suffix: Set the suffix for the sequence numbers.
Padding: Specify the number of digits in the sequence numbers.
Number Next: Set the starting number for the sequence.
Assign the Sequence to a Model:
Open the model's Python file (e.g., models/sale_order.py).
Add the sequence to a field using the default attribute:
name = fields.Char(
string='Order Reference',
required=True,
default=lambda self: self.env['ir.sequence'].next_by_code('sale.order')
)
#Odoo18 #Odoo18Sales #OdooTutorials #Odoo18Release #SalesOrderSequence #OdooERP #OdooFeatures #BusinessAutomation #ERPSoftware #SalesManagement #Odoo18Tutorial #Odoo18NewFeatures #Odoo18SalesManagement
Connect With Us:
—————————————
➡ ️ Websitehttps://www.cybrosys.com/m/
➡ ️ Email: info@cybrosys.com
➡ ️ Twihttps://twitter.com/cybrosysosys
➡ ️ Lihttps://www.linkedin.com/company/cybrosys/brosys
➡ ️ https://www.facebook.com/cybrosystechnologiesnologies
➡ ️ https://www.instagram.com/cybrosystech/brosystech
➡ https://pinterest.com/cybrosys/ / cybrosys