openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04527
lp:~openerp-dev/openobject-addons/trunk-openerp_crm_imp-email_history_subject-uco into lp:~openerp-dev/openobject-addons/trunk-openerp_crm_imp
Ujjvala Collins (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-openerp_crm_imp-email_history_subject-uco into lp:~openerp-dev/openobject-addons/trunk-openerp_crm_imp.
Requested reviews:
OpenERP R&D Addons Team 1 (openerp-dev-addons1)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-openerp_crm_imp-email_history_subject-uco/+merge/54511
Backlog 1.2 : Emails in history for lead/opp
* For now the subject of an email don't appear in history (not in the many to one, event not in the form when double clik on one history entry)
* We need to see subject in the m2o list view (if it's possible)
* And at least add a fiedl subject in the form view of history item
* Need to search by subject of email in search viex of lead and opportunity
* Need a related field : subjects (of the email)
* Add a text field in the search view on this related fields
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-openerp_crm_imp-email_history_subject-uco/+merge/54511
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-openerp_crm_imp.
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2011-03-09 06:21:48 +0000
+++ crm/crm_lead.py 2011-03-23 13:05:22 +0000
@@ -97,6 +97,15 @@
duration = len(no_days)
res[lead.id][field] = abs(int(duration))
return res
+
+ def _get_email_subject(self, cr, uid, ids, fields, args, context=None):
+ res = {}
+ for obj in self.browse(cr, uid, ids, context=context):
+ res[obj.id] = ''
+ for msg in obj.message_ids:
+ if msg.history:
+ res[obj.id] = msg.name
+ return res
_columns = {
# Overridden from res.partner.address:
@@ -149,6 +158,7 @@
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
+ 'subjects': fields.function(_get_email_subject, string='Subject of Email', method=True, type='char', size=64, store=True),
}
=== modified file 'crm/crm_lead_view.xml'
--- crm/crm_lead_view.xml 2011-03-10 13:25:37 +0000
+++ crm/crm_lead_view.xml 2011-03-23 13:05:22 +0000
@@ -184,6 +184,7 @@
</group>
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
<tree string="Communication history">
+ <field name="name"/>
<field name="display_text" string="History Information"/>
<field name="history" invisible="1"/>
<button
@@ -255,6 +256,7 @@
<field name="type_id" invisible="1"/>
<field name="referred" invisible="1"/>
<field name="channel_id" invisible="1"/>
+ <field name="subjects" invisible="1"/>
<field name="stage_id"/>
<button name="stage_previous" string="Previous Stage"
@@ -335,6 +337,7 @@
domain="[('user_id','=', False)]"
help="Unassigned Leads" />
</field>
+ <field name="subjects"/>
<field name="section_id" widget="selection"
context="{'invisible_section': False}">
<filter icon="terp-personal+" groups="base.group_extended"
=== modified file 'crm/crm_opportunity_view.xml'
--- crm/crm_opportunity_view.xml 2011-03-10 13:25:37 +0000
+++ crm/crm_opportunity_view.xml 2011-03-23 13:05:22 +0000
@@ -142,6 +142,7 @@
</group>
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
<tree string="History">
+ <field name="name"/>
<field name="display_text" string="History Information"/>
<field name="history" invisible="1"/>
<button
@@ -230,6 +231,7 @@
<field name="stage_id"/>
<field name="channel_id" invisible="1"/>
<field name="type_id" invisible="1"/>
+ <field name="subjects" invisible="1"/>
<button name="stage_previous" string="Previous Stage"
states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next Stage"
@@ -309,6 +311,7 @@
domain="[]"
help="Show Sales Team"/>
</field>
+ <field name="subjects"/>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
<field name="stage_id" widget="selection" domain="[('type', '=', 'opportunity')]"/>
Follow ups