Reset Sequence in Odoo

A couple days ago, I faced a technical problem in Odoo. My friend asked me how to reset sequence number. Unfortunately Odoo doesn't provide this function. So I developed a module called ix_sequence_manual_reset (you can get this module by clicking this link). Put the module inside addons folder of your odoo repository then restart your server and install it after you update module list. Please note, this module is developed originally for Odoo version 7.0. But it works inside Odoo version 8.0.

This is how to use this module. After you install it just go to Menu Settings >> Technical >> Sequences & Identifiers >> Sequences. Click on your sequence. You will see the form view like picture below.

Figure 1. Form view of my sequence

Click on Reset Next Number button and a pop up window will warn you about undoing this action (Figure 2). Click Process to continue the action. In Figure 3, Next Number Field change to 1 (in Figure 1, Next Number value is 30).

Figure 2. Warning about undoing youe action.

Figure 3. Next Number field overwritten.

Note: This action can't be undone. Make sure the sequence is not used by the field that has a constraint.

Comments

Popular posts from this blog

Making SublimePythonIDE Works on Windows

How to Change Font Type in Sublime Text