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.
I have an object. I would like to define his by addind one of his many2one field name's (mission_id) and his sequence. So I write this code. but when create the objet i am getting the field (mission_id) id's numbre plus the object (mission_wave) sequence. How can i get mission_id name's instead of id?
def create(self, vals):
if vals.get('name', '/') == '/':
vals['name'] = str(vals.get('mission_id') + str(self.env['ir.sequence'].get('hr.mission.wave'))
return super(hr_mission_wave, self).create(vals)
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: 8/10/16, 7:11 AM|
|Seen: 386 times|
|Last updated: 8/10/16, 7:25 AM|