Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-hr_applicant-mma
into lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-hr_applicant-mma/+merge/104062
Hello Sir
crm, mail : I Have added a message_state field in mail.thread object and
related filter for that and fix a issue of hr_applicant
Thanks.
mma
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-hr_applicant-mma/+merge/104062
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban-hr_applicant-mma
into lp:~openerp-dev/openobject-addons/trunk-state_sync_with_kanban.
=== modified file 'crm/crm_lead_menu.xml'
--- crm/crm_lead_menu.xml 2012-04-25 11:51:39 +0000
+++ crm/crm_lead_menu.xml 2012-04-30 07:36:20 +0000
@@ -9,7 +9,7 @@
<field name="domain">['|', ('type','=','lead'), ('type','=',False)]</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="search_view_id" ref="crm.view_crm_case_leads_filter"/>
- <field name="context">{'default_type': 'lead', 'search_default_section_id': section_id, 'stage_type': 'lead'}</field>
+ <field name="context">{'default_type': 'lead', 'search_default_section_id': section_id, 'stage_type': 'lead', 'search_default_inbox': 1}</field>
<field name="help">
<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>
=== modified file 'crm/crm_lead_view.xml'
--- crm/crm_lead_view.xml 2012-04-30 07:02:46 +0000
+++ crm/crm_lead_view.xml 2012-04-30 07:36:20 +0000
@@ -324,6 +324,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Leads">
+ <filter icon="terp-check" name="inbox" string="Inbox" domain="[('message_state','=','unread')]"/>
<filter icon="terp-check"
string="New"
name="new" help="New Leads"
=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py 2012-04-19 12:47:15 +0000
+++ hr_recruitment/hr_recruitment.py 2012-04-30 07:36:20 +0000
@@ -156,7 +156,7 @@
if stage_ids:
return self.write(cr, uid, [applicant_id], {'stage_id': stage_ids[0]}, context=context)
else:
- return cr.execute("""UPDATE hr_applicant SET state=%s WHERE id=%s""", (field_value, hr_applicant_id))
+ return cr.execute("""UPDATE hr_applicant SET state=%s WHERE id=%s""", (field_value, applicant_id))
_columns = {
=== modified file 'hr_recruitment/hr_recruitment_menu.xml'
--- hr_recruitment/hr_recruitment_menu.xml 2011-12-19 16:54:40 +0000
+++ hr_recruitment/hr_recruitment_menu.xml 2012-04-30 07:36:20 +0000
@@ -8,7 +8,7 @@
<field name="res_model">hr.applicant</field>
<field name="view_mode">kanban,tree,form,graph,calendar</field>
<field name="view_id" eval="False"/>
- <field name="context">{'search_default_filter_inprogress':1,'search_default_filter_new':1,"search_default_department_id": department_id}</field>
+ <field name="context">{'search_default_filter_inprogress':1, 'search_default_filter_new':1, "search_default_department_id": department_id, 'search_default_inbox': 1}</field>
<field name="search_view_id" ref="view_crm_case_jobs_filter"/>
<field name="help">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 [email protected]. 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.</field>
</record>
=== modified file 'hr_recruitment/hr_recruitment_view.xml'
--- hr_recruitment/hr_recruitment_view.xml 2012-04-30 07:02:46 +0000
+++ hr_recruitment/hr_recruitment_view.xml 2012-04-30 07:36:20 +0000
@@ -179,6 +179,7 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Jobs">
+ <filter icon="terp-check" name="inbox" string="Inbox" domain="[('message_state','=','unread')]"/>
<filter icon="terp-document-new" string="New" name="filter_new"
domain="[('state','=','draft')]"
help="All Initial Jobs"
=== modified file 'mail/mail_message.py'
--- mail/mail_message.py 2012-04-20 10:44:06 +0000
+++ mail/mail_message.py 2012-04-30 07:36:20 +0000
@@ -218,7 +218,6 @@
('exception', 'Delivery Failed'),
('cancel', 'Cancelled'),
], 'State', readonly=True),
- 'message_state': fields.selection([('read', 'Read'),('unread', 'Unread')], 'Message State'),
'auto_delete': fields.boolean('Auto Delete', help="Permanently delete this email after sending it, to save space"),
'original': fields.binary('Original', help="Original version of the message, as it was sent on the network", readonly=1),
}
@@ -226,7 +225,6 @@
_defaults = {
'type': 'email',
'state': 'received',
- 'message_state': 'unread'
}
#------------------------------------------------------
@@ -525,7 +523,7 @@
if context is None:
context = {}
if context.get('active_ids', False):
- self.write(cr, uid, context['active_ids'], {'message_state':'read'}, context=context)
+ self.pool.get(context['active_model']).write(cr, uid, context['active_ids'], {'message_state':'read'}, context=context)
if message.auto_delete:
self.pool.get('ir.attachment').unlink(cr, uid,
[x.id for x in message.attachment_ids \
@@ -588,7 +586,7 @@
mail_server_id=message.mail_server_id.id,
context=context)
if res:
- message.write({'state':'sent', 'message_id': res, 'message_state': 'read'})
+ message.write({'state':'sent', 'message_id': res})
else:
message.write({'state':'exception'})
message.refresh()
=== modified file 'mail/mail_message_view.xml'
--- mail/mail_message_view.xml 2012-04-30 07:02:46 +0000
+++ mail/mail_message_view.xml 2012-04-30 07:36:20 +0000
@@ -112,7 +112,6 @@
</notebook>
<separator string="" colspan="4"/>
<group col="6" colspan="6">
- <field name="message_state"/>
<field name="state" colspan="2"/>
<field name="subtype" attrs="{'invisible':[('subtype', '=', False)]}"/>
<group colspan="2">
@@ -168,7 +167,6 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Email Search">
- <filter icon="terp-check" name="inbox" string="Inbox" domain="[('message_state','=','unread')]"/>
<separator orientation="vertical"/>
<filter icon="terp-gtk-stop" name="exception" string="Failed" domain="[('state','=','exception')]"/>
<separator orientation="vertical"/>
=== modified file 'mail/mail_thread.py'
--- mail/mail_thread.py 2012-04-06 12:37:32 +0000
+++ mail/mail_thread.py 2012-04-30 07:36:20 +0000
@@ -72,6 +72,7 @@
_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 @@
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 @@
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):
=== modified file 'project/project_view.xml'
--- project/project_view.xml 2012-04-30 07:02:46 +0000
+++ project/project_view.xml 2012-04-30 07:36:20 +0000
@@ -489,6 +489,7 @@
<field name="arch" type="xml">
<search string="Tasks">
<group>
+ <filter icon="terp-check" name="inbox" string="Inbox" domain="[('message_state','=','unread')]"/>
<filter name="draft" string="New" domain="[('state','=','draft')]" help="New Tasks" icon="terp-check"/>
<filter name="open" string="In Progress" domain="[('state','=','open')]" help="In Progress Tasks" icon="terp-camera_test"/>
<filter string="Pending" domain="[('state','=','pending')]" context="{'show_delegated':False}" help="Pending Tasks" icon="terp-gtk-media-pause"/>
@@ -529,7 +530,7 @@
<field name="view_mode">kanban,tree,form,calendar,gantt,graph</field>
<field eval="False" name="filter"/>
<field name="view_id" eval="False"/>
- <field name="context">{"search_default_project_id": project_id}</field>
+ <field name="context">{"search_default_project_id": project_id, 'search_default_inbox': 1}</field>
<field name="search_view_id" ref="view_task_search_form"/>
<field name="help">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.</field>
</record>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp