Is there a way to automatically set ongoing customer ID's in openERP v.7?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
You can use sequence.
Add sequence in sequence.xml file.
<record model="ir.sequence.type" id="seq_type_emp_id">
<field name="name">Employee Number</field>
<field name="code">hr.employee</field>
</record>
<record model="ir.sequence" id="seq_emp_id">
<field name="name">Employee Number</field>
<field name="code">hr.employee</field>
<field name="prefix"></field>
<field name="padding">3</field>
</record>
After that you can call the sequence:
my_sequence = self.pool['ir.sequence'].get(cr, uid, seq_obj_name)
self.write(cr, uid, [picking.id], {'ur_emp_no_field': my_sequence})
You can call this sequence either from create, your own function, write or from _defaults.
Thank you for your reply. I already told that I am new at openerp. So where I can insert this sequence.xml and also call it? EDIT: This sequence looks like Employee ID's, I have to modify it right? Thanks!
Yes, you have to modify as per your requirement. Create sequence.xml
and put it in __openerp__.py
same as you add your other xml files.
I'm new at openerp. This will be the first time to add a new sequence :D Is there a manual or sth. like that? I start without any foreknowledge..
Hi cdn,
Yes, there is a way to set automatically customer ID's in openERP v7.
For that you have to create sequence.
Setting/Sequences & Identifiers/Sequences.
Thank You.
(SerpentCS Pvt. Ltd.)
Is there any code required to use the Sequence for Customers?
I would like to know the rest of that conversation. Thanks.
In openERP version 7, the answer is yes; there is a way to automatically set customer IDs.
To accomplish this, you will need to create sequence. Setting/Sequences & Identifiers/Sequences.
Many thanks, you can take a look on https://stackoverflow.com/questions/50716507/how-to-give-odoo-xpath-in-t-attf-id https://slope-game.io
Is there a specific code that needs to be entered in order to use the Sequence for Customers?
OK. I would like to set a start value for my customers ID, like 00121. The first customer get this ID, the second 00122 (auto increment).
BTW: I'm new at openerp, is there a manual or sth. like that? I'm not a programmer as well and the backend looks very complicated..
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
please explain what you mean by an "ongoing customer ID"
OK. I would like to set a start value for my customers ID, like 00121. The first customer get this ID, the second 00122 (auto increment).
BTW: I'm new at openerp, is there a manual or sth. like that? I'm not a programmer as well and the backend looks very complicated..
you can use sequence.