Skip to main content

Odoo: Create Sequence or Running Number

Odoo sequence ussually needed for automatically generated and suppose to be unique value to identified certain object or in this context is document. For example company need unique document number for every Sales document they have.

When we need to create NEW sequence in odoo ?
When we have new object and this object suppose to have unique and auto generated number. in this example we have new object called 'sale.doc' will be used to store any document related to SO such as contract, delivery doc etc.

1. create xml code to declare the sequence
2. call the sequence and set it on certain char field ('name) that belongs to the same object

Comments

Post a Comment

Popular posts from this blog

Odoo: How to Inherit Controller

Sometime we need to modify a certain behavior when accessing odoo url (route). That time we need to do inheritance to odoo controller and then put our desired custom behavior when the url triggered. The way to inherit an odoo controller is slightly different than to inherit odoo object/model. In this tutorial i will do inheritance on odoo route "/shop/checkout" which is the url route when doing website sale checkout, because i want to show some specific product information on the website that i cant call in the xml template unless i parse the data from python controller to xml view. Lets jump into it. Here is the base controller Here is the inheritance controller in the example above i import base controller class (WebsiteSale) and use it as parameter on my new class (WebsiteSaleInherit). Thats it !! Comment below if you have any questions.

Fun CSS/JS : Font Typewriter Animation

Here is fun code to add typewriter animation to your words. Hope you guys having fun.