[FIX] crm, hr_recruitment, task, issue: fixed default priorities + order based on...
authorThibault Delavallée <tde@openerp.com>
Fri, 22 Aug 2014 12:22:26 +0000 (14:22 +0200)
committerThibault Delavallée <tde@openerp.com>
Fri, 22 Aug 2014 12:39:36 +0000 (14:39 +0200)
addons/crm/crm_lead.py
addons/hr_recruitment/hr_recruitment.py
addons/project/project.py
addons/project_issue/project_issue.py

index d994237..22bc1bf 100644 (file)
@@ -68,7 +68,7 @@ class crm_lead(format_address, osv.osv):
     """ CRM Lead Case """
     _name = "crm.lead"
     _description = "Lead/Opportunity"
-    _order = "priority,date_action,id desc"
+    _order = "priority desc,date_action,id desc"
     _inherit = ['mail.thread', 'ir.needaction_mixin', 'crm.tracking.mixin']
 
     _track = {
index 9fe72cc..e7d6bd2 100644 (file)
@@ -79,7 +79,7 @@ class hr_recruitment_degree(osv.osv):
 class hr_applicant(osv.Model):
     _name = "hr.applicant"
     _description = "Applicant"
-    _order = "id desc"
+    _order = "priority desc, id desc"
     _inherit = ['mail.thread', 'ir.needaction_mixin']
 
     _track = {
@@ -244,6 +244,7 @@ class hr_applicant(osv.Model):
         'department_id': lambda s, cr, uid, c: s._get_default_department_id(cr, uid, c),
         'company_id': lambda s, cr, uid, c: s._get_default_company_id(cr, uid, s._get_default_department_id(cr, uid, c), c),
         'color': 0,
+        'priority': '0',
         'date_last_stage_update': fields.datetime.now,
     }
 
index 209431a..2e39431 100644 (file)
@@ -782,7 +782,7 @@ class task(osv.osv):
         'project_id': _get_default_project_id,
         'date_last_stage_update': fields.datetime.now,
         'kanban_state': 'normal',
-        'priority': '1',
+        'priority': '0',
         'progress': 0,
         'sequence': 10,
         'active': True,
index 337d416..cadb429 100644 (file)
@@ -281,7 +281,7 @@ class project_issue(osv.Model):
         'active': 1,
         'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
         'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
-        'priority': '1',
+        'priority': '0',
         'kanban_state': 'normal',
         'date_last_stage_update': fields.datetime.now,
         'user_id': lambda obj, cr, uid, context: uid,