From 6b3a7811d1560a01673c0faa104a67cccd564476 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Mon, 30 Apr 2012 13:03:46 +0530 Subject: [PATCH] [IMP]mail,crm:added a message_state field in mail.thread object and related filter for that and fix a issue of hr_applicant bzr revid: mma@tinyerp.com-20120430073346-dig7dbbpc73ww20p --- addons/crm/crm_lead_menu.xml | 2 +- addons/crm/crm_lead_view.xml | 1 + addons/hr_recruitment/hr_recruitment.py | 2 +- addons/hr_recruitment/hr_recruitment_menu.xml | 2 +- addons/hr_recruitment/hr_recruitment_view.xml | 1 + addons/mail/mail_message.py | 6 ++---- addons/mail/mail_message_view.xml | 2 -- addons/mail/mail_thread.py | 3 +++ addons/project/project_view.xml | 3 ++- 9 files changed, 12 insertions(+), 10 deletions(-) diff --git a/addons/crm/crm_lead_menu.xml b/addons/crm/crm_lead_menu.xml index 3cd45fd..5fc8891 100644 --- a/addons/crm/crm_lead_menu.xml +++ b/addons/crm/crm_lead_menu.xml @@ -9,7 +9,7 @@ ['|', ('type','=','lead'), ('type','=',False)] - {'default_type': 'lead', 'search_default_section_id': section_id, 'stage_type': 'lead'} + {'default_type': 'lead', 'search_default_section_id': section_id, 'stage_type': 'lead', 'search_default_inbox': 1} <img src="http://www.thaicrmsoftware.com/wp-content/uploads/2011/11/lead-conversion.jpg" align="right" style="padding: 6px" width="306" height="223"> <h2>Create your first OpenERP Lead </h2> diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 9557708..30c4fef 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -324,6 +324,7 @@ search + hr.applicant kanban,tree,form,graph,calendar - {'search_default_filter_inprogress':1,'search_default_filter_new':1,"search_default_department_id": department_id} + {'search_default_filter_inprogress':1, 'search_default_filter_new':1, "search_default_department_id": department_id, 'search_default_inbox': 1} From this menu you can track applicants in the recruitment process and manage all operations: meetings, interviews, phone calls, etc. If you setup the email gateway, applicants and their attached CV are created automatically when an email is sent to jobs@yourcompany.com. If you install the document management modules, all documents (CV and motivation letters) are indexed automatically, so that you can easily search through their content. diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 76b73e9..08f20cd 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -179,6 +179,7 @@ search + - @@ -168,7 +167,6 @@ search - diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 8cd8ef4..fc8e475 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -72,6 +72,7 @@ class mail_thread(osv.osv): _columns = { 'message_ids_social': fields.function(_get_message_ids, method=True, type='one2many', obj='mail.message', string='Temp messages', _fields_id = 'res_id'), + 'message_state': fields.selection([('read', 'Read'),('unread', 'Unread')], 'Message State'), } #------------------------------------------------------ @@ -569,6 +570,7 @@ class mail_thread(osv.osv): data.update(custom_values) res_id = model_pool.create(cr, uid, data, context=context) self.message_append_dict(cr, uid, [res_id], msg_dict, context=context) + self.write(cr, uid, [res_id], {'message_state':'unread'}, context) return res_id def message_update(self, cr, uid, ids, msg_dict, vals={}, default_act=None, context=None): @@ -587,6 +589,7 @@ class mail_thread(osv.osv): to determine the model of the thread to update (instead of the current model). """ + self.write(cr, uid, ids, {'message_state':'unread'}, context=context) return self.message_append_dict(cr, uid, ids, msg_dict, context=context) def message_thread_followers(self, cr, uid, ids, context=None): diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index f86caea..fe64e67 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -489,6 +489,7 @@ + @@ -529,7 +530,7 @@ kanban,tree,form,calendar,gantt,graph - {"search_default_project_id": project_id} + {"search_default_project_id": project_id, 'search_default_inbox': 1} A task represents a work that has to be done. Each user works in his own list of tasks where he can record his task work in hours. He can work and close the task itself or delegate it to another user. If you delegate a task to another user, you get a new task in pending state, which will be reopened when you have to review the work achieved. If you install the project_timesheet module, task work can be invoiced based on the project configuration. With the project_mrp module, sales orders can create tasks automatically when they are confirmed. -- 1.7.10.4