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.
Odoo v9 online
How do I create sequence number for my projects task(s)?
I want to be able to have a new number generated for every new task I make and then be able to search/lookup my task from the search bar. The same as when you create a new Quote it creates a new quote number every time.
I have Odoo Saas online, so I can only add server actions to add any python code.
Hi Randall Risser,
If you want to add sequence number for every task, You have to add a field in task model and need to define a record in ir.sequence as xml.
in your project.task model please add one field and a function,
name = fields.Char(string="Task No", readonly=True, required=True, copy=False, default='New')
def create(self, vals):
if vals.get('name', 'New') == 'New':
vals['name'] = self.env['ir.sequence'].next_by_code('project.task') or 'New'
result = super(FlightReport, self).create(vals)
In your XML:
Hope this may help you.
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: 11/2/16, 2:47 PM|
|Seen: 990 times|
|Last updated: 11/2/16, 11:28 PM|