Odoo Help


How to use sequence(Invoice Number)

Yogesh Mahera
on 2/17/16, 4:28 AM 693 views

How To generate Random Numbers prefix String or numbers

Give Example in v8.

Vishal Gediya
On 2/18/16, 2:40 AM


To create a sequence define one xml file like, seq_name.xml

<?xml version="1.0" encoding="utf-8"?>
<data noupdate="1">
<record id="seq_type_competence_skill" model="ir.sequence.type">
<field name="name">Competence Id</field>
<field name="code">competence.skill</field>
<record id="seq_competence_skill" model="ir.sequence">
<field name="name">Competence Id</field>
<field name="code">competence.skill</field>
<field name="prefix">ID</field>
<field name="padding">4</field>
<field name="company_id" eval="False" />

write _defaults in .py file to generate automaic sequence

'seq_id':lambda self, cr, uid, context:self.pool.get('ir.sequence').get(cr, uid, 'competence.skill', context=context)

Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--
Ankit H Gandhi(AHG)
| 5 3 6
Rajkot, India
--Ankit H Gandhi(AHG)--

Learning Python..

Ankit H Gandhi(AHG)
On 2/18/16, 1:48 AM

Dear Yougesh,

Please refer below link may be help for you.




Ankit H Gandhi.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/17/16, 4:28 AM
Seen: 693 times
Last updated: 2/18/16, 2:40 AM