Odoo Help

Welcome!

This community 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.

0

How to use sequence(Invoice Number)

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

How To generate Random Numbers prefix String or numbers

Give Example in v8.

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

Hello,

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

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<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>
<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" />
</record>
</data>
</openerp>


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)
0

Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--
996
| 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.

https://www.odoo.com/forum/help-1/question/how-to-implement-sequences-8830

http://pinakinnayi.blogspot.in/2012/05/auto-number-generate-in-openerp.html

Cheers,

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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