<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>
<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"
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 = {
<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 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.</field>
</record>
<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"
('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),
}
_defaults = {
'type': 'email',
'state': 'received',
- 'message_state': 'unread'
}
#------------------------------------------------------
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 \
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()
</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">
<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"/>
_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'),
}
#------------------------------------------------------
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):
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):
<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"/>
<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>