[kanban] projec.task
bzr revid: tta@openerp.com-20110920065728-stc4wdgw9lszs21t
This commit is contained in:
@@ -470,6 +470,7 @@ class task(osv.osv):
|
||||
'manager_id': fields.related('project_id', 'analytic_account_id', 'user_id', type='many2one', relation='res.users', string='Project Manager'),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
'id': fields.integer('ID'),
|
||||
'color': fields.integer('Color Index'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -485,6 +486,21 @@ class task(osv.osv):
|
||||
|
||||
_order = "sequence,priority, date_start, name, id"
|
||||
|
||||
def set_priority(self, cr, uid, ids, priority):
|
||||
"""Set task priority
|
||||
"""
|
||||
return self.write(cr, uid, ids, {'priority' : priority})
|
||||
|
||||
def set_high_priority(self, cr, uid, ids, *args):
|
||||
"""Set task priority to high
|
||||
"""
|
||||
return self.set_priority(cr, uid, ids, '1')
|
||||
|
||||
def set_normal_priority(self, cr, uid, ids, *args):
|
||||
"""Set task priority to normal
|
||||
"""
|
||||
return self.set_priority(cr, uid, ids, '3')
|
||||
|
||||
def _check_recursion(self, cr, uid, ids, context=None):
|
||||
for id in ids:
|
||||
visited_branch = set()
|
||||
|
||||
Reference in New Issue
Block a user