Odoo Help

0

How to use sequence(Invoice Number)

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

How To generate Random Numbers prefix String or numbers

Give Example in v8.

1
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)--
1131
| 5 4 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.

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.

Register

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)

Stats

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