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 | etc.
Hello all, please i have a model that needs the ID for each applicant to be generated automatically when the document is approval. I want the ID for each applicant to be generated uniquely when the form is approve. The sample fields in the model are: Applicant ID (to be generated when the form is approved), Applicant name. etc. Please how do I achieve that? Thanks
You have to use the same method as generating a unique order number. Or just use the id of the record. That should be unique anyway.
Are there any requirements for the Applicant ID (needs to be at least x long, must be in the following format: XXX-ID-(A or B), ... ) Depending on the answers of the above question, you can use the record ID, or use ir.sequences.
stockpick = self.pool.get('stock.picking').browse(.....) name = sequence_obj.get('stock.picking.%s'%(stockpick.type))
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
|Asked: 6/7/13, 9:48 AM|
|Seen: 2067 times|
|Last updated: 3/16/15, 8:10 AM|