SlideShare a Scribd company logo
1 of 10
How to make Sequence
Number in Odoo 16
In Odoo 16, the sequence number is a field used to assign a
unique, incremental number to records in a specific model. It
helps in maintaining the order or sequence of records and can be
useful in various scenarios.
Here are some common use cases of sequence number:
• Order and Ranking: Sequence numbers can be used to establish a specific order or ranking for records within a model. For
example, in a list of tasks, the sequence number can determine the priority or order in which the tasks should be executed.
• Document Numbering: Sequence numbers are commonly used to generate unique document numbers, such as invoices,
purchase orders, sales orders, etc. Each time a new record is created, the sequence number field is automatically assigned a
new, sequential value.
• Sorting and Filtering: The sequence number field can be used for sorting and filtering records. By sorting records based on the
sequence number, you can view them in a specific order, such as ascending or descending.
• Workflow and Automation: Sequence numbers can be leveraged in workflow and automation rules. For example, you can
define specific actions or triggers based on the sequence number of a record, allowing you to automate certain processes or
notifications.
• Reference and Identification: Sequence numbers can serve as a reference or identification for records. They provide a unique
identifier that can be used to easily locate or reference specific records within a model.
Let's talk about how to create a sequence number in Odoo 16 using Python and XML.
• As seen in the image below, first we need to define a field for the sequence.
• Then we need to define a function for creating sequence in the particular model.
• And after that, make an XML file and create record for that.
Let’s discuss each item in the XML file.
• The ID is the ID of that record, it is unique for each record. And that record will be stored in the ir.sequence table.
• name - is the Name of the record that will be created on the specified model.
• Code - is the sequence code for the record.
• Prefix - is a character field that gives the prefix of the sequence for the record.
• Padding - is the size of the sequence. We can decide the size.
• Active- It determines whether the sequence is currently active or not.
• Number Next - The number_next field determines the value of the next sequence number to be generated.
• Number Increment - The number_increment field determines the amount by which the sequence number increases with each new
number generated.
Let’s take a look at the UI,
In the above screenshot we can see a sequence number is generated with a prefix of IN and the
number is 0001 the first number is automatically generated as 1 and we create another record
in the same model that will be 2 and so on and also here we can see the padding of the number
is 4 that we will mentioned in the code.
Also we can configure the sequence number from the general setting of Odoo,
• Go to the "Settings" menu and select "Technical" -> "Sequences & Identifiers" -> "Sequences."
• Click the "Create" button to create a new sequence.
• Enter a name for the sequence, such as "Your Model."
• Enter a code for the sequence, such as "your.model."
• Choose a prefix and/or suffix for the sequence, if desired.
• Set the "Next Number" field to the starting number for the sequence.
• Set the "Padding" field to the number of digits you want the sequence number to have.
• Select the "Implementation" option for the sequence, such as "Manual," "Date Range," or "Custom."
• Save the sequence by clicking the "Save" button.
• Use the sequence in your Odoo application by referencing it in your code or by using it in your forms and reports.
Check our company website
for related blogs and Odoo book.
https://www.youtube.com/watch?v=lXD4
fI3tBdw

More Related Content

What's hot

Transform your Account Analysis and Drilldown using User-Defined Views in R12
Transform your Account Analysis and Drilldown using User-Defined Views in R12Transform your Account Analysis and Drilldown using User-Defined Views in R12
Transform your Account Analysis and Drilldown using User-Defined Views in R12
Prithis Das, PMP, OCS ☁️
 

What's hot (20)

How to Define One2Many Field in Odoo 15
 How to Define One2Many Field in Odoo 15 How to Define One2Many Field in Odoo 15
How to Define One2Many Field in Odoo 15
 
Sap scripts
Sap scriptsSap scripts
Sap scripts
 
How to Use Constraint and SQL Constraint in Odoo 15
How to Use Constraint and SQL Constraint in Odoo 15How to Use Constraint and SQL Constraint in Odoo 15
How to Use Constraint and SQL Constraint in Odoo 15
 
Create Own Analytic Odoo dashboards in odoo Amaze odoo dynamic dashboard mod...
Create Own Analytic Odoo dashboards in odoo  Amaze odoo dynamic dashboard mod...Create Own Analytic Odoo dashboards in odoo  Amaze odoo dynamic dashboard mod...
Create Own Analytic Odoo dashboards in odoo Amaze odoo dynamic dashboard mod...
 
Introduction to Slack App Development
Introduction to Slack App Development Introduction to Slack App Development
Introduction to Slack App Development
 
How to Import data into OpenERP V7
How to Import data into OpenERP V7How to Import data into OpenERP V7
How to Import data into OpenERP V7
 
Odoo introduction
Odoo introductionOdoo introduction
Odoo introduction
 
Product Warranty Management in odoo, set warranty period in days, months, years
Product Warranty Management in odoo, set warranty period in days, months, yearsProduct Warranty Management in odoo, set warranty period in days, months, years
Product Warranty Management in odoo, set warranty period in days, months, years
 
Say Goodbye to Excel with the New built-in Odoo Spreadsheets
Say Goodbye to Excel with the New built-in Odoo SpreadsheetsSay Goodbye to Excel with the New built-in Odoo Spreadsheets
Say Goodbye to Excel with the New built-in Odoo Spreadsheets
 
HOW TO CREATE A MODULE IN ODOO
HOW TO CREATE A MODULE IN ODOOHOW TO CREATE A MODULE IN ODOO
HOW TO CREATE A MODULE IN ODOO
 
Odoo (OpenERP) User Manual - Human Resource
Odoo (OpenERP) User Manual - Human Resource Odoo (OpenERP) User Manual - Human Resource
Odoo (OpenERP) User Manual - Human Resource
 
Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)Odoo (Build module, Security, ORM)
Odoo (Build module, Security, ORM)
 
Vb.net class notes
Vb.net class notesVb.net class notes
Vb.net class notes
 
Odoo - Smart buttons
Odoo - Smart buttonsOdoo - Smart buttons
Odoo - Smart buttons
 
Episode 4 - Introduction to SOQL in Salesforce
Episode 4  - Introduction to SOQL in SalesforceEpisode 4  - Introduction to SOQL in Salesforce
Episode 4 - Introduction to SOQL in Salesforce
 
Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15Set Default Values to Fields in Odoo 15
Set Default Values to Fields in Odoo 15
 
Window 10 ppt
Window 10 pptWindow 10 ppt
Window 10 ppt
 
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
What are Wizards - Defining and Launching in Odoo 15Wizards - Defining and La...
 
SAP ALE Idoc
SAP ALE IdocSAP ALE Idoc
SAP ALE Idoc
 
Transform your Account Analysis and Drilldown using User-Defined Views in R12
Transform your Account Analysis and Drilldown using User-Defined Views in R12Transform your Account Analysis and Drilldown using User-Defined Views in R12
Transform your Account Analysis and Drilldown using User-Defined Views in R12
 

Similar to How to Make Sequence Number in Odoo 16

Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
kssr99
 

Similar to How to Make Sequence Number in Odoo 16 (20)

INTRODUCTION TO C PROGRAMMING in basic c language
INTRODUCTION TO C PROGRAMMING in basic c languageINTRODUCTION TO C PROGRAMMING in basic c language
INTRODUCTION TO C PROGRAMMING in basic c language
 
Fuel Good 2018: Jet Reports Pre-Conference Training
Fuel Good 2018: Jet Reports Pre-Conference TrainingFuel Good 2018: Jet Reports Pre-Conference Training
Fuel Good 2018: Jet Reports Pre-Conference Training
 
Bdc
BdcBdc
Bdc
 
SAP MM - Master Data.pptx
SAP MM - Master Data.pptxSAP MM - Master Data.pptx
SAP MM - Master Data.pptx
 
Ps training mannual ( configuration )
Ps training mannual ( configuration )Ps training mannual ( configuration )
Ps training mannual ( configuration )
 
Sap abap interview questions
Sap abap interview questionsSap abap interview questions
Sap abap interview questions
 
Serial Numbers in SAP MM by Aman Saksena.pptx
Serial Numbers in SAP MM by Aman Saksena.pptxSerial Numbers in SAP MM by Aman Saksena.pptx
Serial Numbers in SAP MM by Aman Saksena.pptx
 
Serial Numbers in SAP MM by Aman Saksena.pdf
Serial Numbers in SAP MM by Aman Saksena.pdfSerial Numbers in SAP MM by Aman Saksena.pdf
Serial Numbers in SAP MM by Aman Saksena.pdf
 
Python Fundamentals for the begginers in programming
Python Fundamentals for the begginers in programmingPython Fundamentals for the begginers in programming
Python Fundamentals for the begginers in programming
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
 
Model Fields in Odoo 15
 Model Fields in Odoo 15 Model Fields in Odoo 15
Model Fields in Odoo 15
 
Python PPT.pptx
Python PPT.pptxPython PPT.pptx
Python PPT.pptx
 
Revision booklet 6957 2016
Revision booklet 6957 2016Revision booklet 6957 2016
Revision booklet 6957 2016
 
C fundamentals
C fundamentalsC fundamentals
C fundamentals
 
Sql Basics And Advanced
Sql Basics And AdvancedSql Basics And Advanced
Sql Basics And Advanced
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENT
 
Copying number ranges in SAP FICO ECC
Copying number ranges  in SAP FICO ECCCopying number ranges  in SAP FICO ECC
Copying number ranges in SAP FICO ECC
 
Group technology
Group technologyGroup technology
Group technology
 
Model Attribute - _order
Model Attribute - _orderModel Attribute - _order
Model Attribute - _order
 
SAP Serial number management
SAP Serial number managementSAP Serial number management
SAP Serial number management
 

More from Celine George

More from Celine George (20)

How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17
 
How to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 InventoryHow to Manage Closest Location in Odoo 17 Inventory
How to Manage Closest Location in Odoo 17 Inventory
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Make Down Payments in Odoo 17 Sales App
How to Make Down Payments in Odoo 17 Sales AppHow to Make Down Payments in Odoo 17 Sales App
How to Make Down Payments in Odoo 17 Sales App
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

Recently uploaded

MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 
Orientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfOrientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdf
Elizabeth Walsh
 

Recently uploaded (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxMichaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
Orientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfOrientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdf
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 

How to Make Sequence Number in Odoo 16

  • 1. How to make Sequence Number in Odoo 16
  • 2. In Odoo 16, the sequence number is a field used to assign a unique, incremental number to records in a specific model. It helps in maintaining the order or sequence of records and can be useful in various scenarios.
  • 3. Here are some common use cases of sequence number: • Order and Ranking: Sequence numbers can be used to establish a specific order or ranking for records within a model. For example, in a list of tasks, the sequence number can determine the priority or order in which the tasks should be executed. • Document Numbering: Sequence numbers are commonly used to generate unique document numbers, such as invoices, purchase orders, sales orders, etc. Each time a new record is created, the sequence number field is automatically assigned a new, sequential value. • Sorting and Filtering: The sequence number field can be used for sorting and filtering records. By sorting records based on the sequence number, you can view them in a specific order, such as ascending or descending. • Workflow and Automation: Sequence numbers can be leveraged in workflow and automation rules. For example, you can define specific actions or triggers based on the sequence number of a record, allowing you to automate certain processes or notifications. • Reference and Identification: Sequence numbers can serve as a reference or identification for records. They provide a unique identifier that can be used to easily locate or reference specific records within a model.
  • 4. Let's talk about how to create a sequence number in Odoo 16 using Python and XML. • As seen in the image below, first we need to define a field for the sequence. • Then we need to define a function for creating sequence in the particular model.
  • 5. • And after that, make an XML file and create record for that.
  • 6. Let’s discuss each item in the XML file. • The ID is the ID of that record, it is unique for each record. And that record will be stored in the ir.sequence table. • name - is the Name of the record that will be created on the specified model. • Code - is the sequence code for the record. • Prefix - is a character field that gives the prefix of the sequence for the record. • Padding - is the size of the sequence. We can decide the size. • Active- It determines whether the sequence is currently active or not. • Number Next - The number_next field determines the value of the next sequence number to be generated. • Number Increment - The number_increment field determines the amount by which the sequence number increases with each new number generated.
  • 7. Let’s take a look at the UI,
  • 8. In the above screenshot we can see a sequence number is generated with a prefix of IN and the number is 0001 the first number is automatically generated as 1 and we create another record in the same model that will be 2 and so on and also here we can see the padding of the number is 4 that we will mentioned in the code.
  • 9. Also we can configure the sequence number from the general setting of Odoo, • Go to the "Settings" menu and select "Technical" -> "Sequences & Identifiers" -> "Sequences." • Click the "Create" button to create a new sequence. • Enter a name for the sequence, such as "Your Model." • Enter a code for the sequence, such as "your.model." • Choose a prefix and/or suffix for the sequence, if desired. • Set the "Next Number" field to the starting number for the sequence. • Set the "Padding" field to the number of digits you want the sequence number to have. • Select the "Implementation" option for the sequence, such as "Manual," "Date Range," or "Custom." • Save the sequence by clicking the "Save" button. • Use the sequence in your Odoo application by referencing it in your code or by using it in your forms and reports.
  • 10. Check our company website for related blogs and Odoo book. https://www.youtube.com/watch?v=lXD4 fI3tBdw