Foram Katharotiya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa-mail_data-fka into
lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa.
Requested reviews:
Amit Patel (OpenERP) (apa-tiny)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-message-sub-type-apa-mail_data-fka/+merge/121862
Hello Sir,
-Improve demo data in crm lead
-Add demo data in project & task
Thanks,
FKA
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-message-sub-type-apa-mail_data-fka/+merge/121862
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa.
=== modified file 'crm/crm_lead_data.xml'
--- crm/crm_lead_data.xml 2012-08-16 10:09:08 +0000
+++ crm/crm_lead_data.xml 2012-08-29 13:20:28 +0000
@@ -155,37 +155,32 @@
</record>
<!-- mail subtype -->
- <record id="mail_subtype_lead_new" model="mail.message.subtype">
+ <record id="mail.mail_subtype_new" model="mail.message.subtype">
<field name="name">new</field>
- <field name="model_ids" eval="[(6, 0, [ref('crm.model_crm_lead')])]"/>
+ <field name="model_ids" eval="[(4,ref('crm.model_crm_lead'))]"/>
<field name="default" eval="False"/>
</record>
- <record id="mail_subtype_lead_won" model="mail.message.subtype">
+ <record id="mail_subtype_won" model="mail.message.subtype">
<field name="name">won</field>
- <field name="model_ids" eval="[(6, 0, [ref('crm.model_crm_lead')])]"/>
+ <field name="model_ids" eval="[(4,ref('crm.model_crm_lead'))]"/>
</record>
- <record id="mail_subtype_lead_lost" model="mail.message.subtype">
+ <record id="mail_subtype_lost" model="mail.message.subtype">
<field name="name">lost</field>
- <field name="model_ids" eval="[(6, 0, [ref('crm.model_crm_lead')])]"/>
+ <field name="model_ids" eval="[(4, ref('crm.model_crm_lead'))]"/>
</record>
- <record id="mail_subtype_lead_stage_change" model="mail.message.subtype">
+ <record id="mail.mail_subtype_stage_change" model="mail.message.subtype">
<field name="name">stage change</field>
- <field name="model_ids" eval="[(6, 0, [ref('crm.model_crm_lead')])]"/>
- <field name="default" eval="False"/>
- </record>
- <record id="mail_subtype_lead_other" model="mail.message.subtype">
- <field name="name">other</field>
- <field name="model_ids" eval="[(6, 0, [ref('crm.model_crm_lead')])]"/>
- <field name="default" eval="False"/>
- </record>
- <record id="mail_subtype_lead_email" model="mail.message.subtype">
- <field name="name">email</field>
- <field name="model_ids" eval="[(6, 0, [ref('crm.model_crm_lead')])]"/>
- </record>
- <record id="mail_subtype_lead_comment" model="mail.message.subtype">
- <field name="name">comment</field>
- <field name="model_ids" eval="[(6, 0, [ref('crm.model_crm_lead')])]"/>
- <field name="default" eval="False"/>
+ <field name="model_ids" eval="[(4,ref('crm.model_crm_lead'))]"/>
+ <field name="default" eval="False"/>
+ </record>
+ <record id="mail.mail_subtype_email" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('crm.model_crm_lead'))]"/>
+ </record>
+ <record id="mail.mail_subtype_comment" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('crm.model_crm_lead'))]"/>
+ </record>
+ <record id="mail.mail_subtype_other" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('crm.model_crm_lead'))]"/>
</record>
</data>
</openerp>
=== modified file 'mail/data/mail_data.xml'
--- mail/data/mail_data.xml 2012-08-06 00:44:17 +0000
+++ mail/data/mail_data.xml 2012-08-29 13:20:28 +0000
@@ -12,5 +12,16 @@
<field eval="'process_email_queue'" name="function"/>
<field eval="'()'" name="args"/>
</record>
+
+ <record id="mail_subtype_other" model="mail.message.subtype">
+ <field name="name">other</field>
+ <field name="default" eval="False"/>
+ </record>
+ <record id="mail_subtype_email" model="mail.message.subtype">
+ <field name="name">email</field>
+ </record>
+ <record id="mail_subtype_comment" model="mail.message.subtype">
+ <field name="name">comment</field>
+ </record>
</data>
</openerp>
=== modified file 'project/project.py'
--- project/project.py 2012-08-23 05:06:17 +0000
+++ project/project.py 2012-08-29 13:20:28 +0000
@@ -536,23 +536,23 @@
return project_id
def create_send_note(self, cr, uid, ids, context=None):
- return self.message_append_note(cr, uid, ids, body=_("Project has been <b>created</b>."), context=context)
+ return self.message_append_note(cr, uid, ids, body=_("Project has been <b>created</b>."), subtype="new", context=context)
def set_open_send_note(self, cr, uid, ids, context=None):
message = _("Project has been <b>opened</b>.")
- return self.message_append_note(cr, uid, ids, body=message, context=context)
+ return self.message_append_note(cr, uid, ids, body=message, subtype="open", context=context)
def set_pending_send_note(self, cr, uid, ids, context=None):
message = _("Project is now <b>pending</b>.")
- return self.message_append_note(cr, uid, ids, body=message, context=context)
+ return self.message_append_note(cr, uid, ids, body=message, subtype="pending", context=context)
def set_cancel_send_note(self, cr, uid, ids, context=None):
message = _("Project has been <b>cancelled</b>.")
- return self.message_append_note(cr, uid, ids, body=message, context=context)
+ return self.message_append_note(cr, uid, ids, body=message, subtype="cancel", context=context)
def set_close_send_note(self, cr, uid, ids, context=None):
message = _("Project has been <b>closed</b>.")
- return self.message_append_note(cr, uid, ids, body=message, context=context)
+ return self.message_append_note(cr, uid, ids, body=message, subtype="close", context=context)
def write(self, cr, uid, ids, vals, context=None):
# if alias_model has been changed, update alias_model_id accordingly
@@ -1210,14 +1210,14 @@
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
""" Override of the (void) default notification method. """
stage_name = self.pool.get('project.task.type').name_get(cr, uid, [stage_id], context=context)[0][1]
- return self.message_append_note(cr, uid, ids, body= _("Stage changed to <b>%s</b>.") % (stage_name), context=context)
+ return self.message_append_note(cr, uid, ids, body= _("Stage changed to <b>%s</b>.") % (stage_name), subtype="stage change", context=context)
def create_send_note(self, cr, uid, ids, context=None):
- return self.message_append_note(cr, uid, ids, body=_("Task has been <b>created</b>."), context=context)
+ return self.message_append_note(cr, uid, ids, body=_("Task has been <b>created</b>."), subtype="new", context=context)
def case_draft_send_note(self, cr, uid, ids, context=None):
msg = _('Task has been set as <b>draft</b>.')
- return self.message_append_note(cr, uid, ids, body=msg, context=context)
+ return self.message_append_note(cr, uid, ids, body=msg, subtype="draft", context=context)
def do_delegation_send_note(self, cr, uid, ids, context=None):
for task in self.browse(cr, uid, ids, context=context):
=== modified file 'project/project_data.xml'
--- project/project_data.xml 2012-08-08 12:08:50 +0000
+++ project/project_data.xml 2012-08-29 13:20:28 +0000
@@ -83,6 +83,49 @@
<field name="case_default" eval="True"/>
<field name="fold" eval="True"/>
</record>
+
+ <!-- SUBTYPE -->
+ <record id="mail.mail_subtype_new" model="mail.message.subtype">
+ <field name="name">new</field>
+ <field name="model_ids" eval="[(4,ref('project.model_project_project')),(4,ref('project.model_project_task'))]"/>
+ <field name="default" eval="False"/>
+ </record>
+ <record id="mail.mail_subtype_open" model="mail.message.subtype">
+ <field name="name">open</field>
+ <field name="model_ids" eval="[(4,ref('project.model_project_project'))]"/>
+ </record>
+ <record id="mail.mail_subtype_pending" model="mail.message.subtype">
+ <field name="name">pending</field>
+ <field name="model_ids" eval="[(4,ref('project.model_project_project'))]"/>
+ <field name="default" eval="False"/>
+ </record>
+ <record id="mail.mail_subtype_close" model="mail.message.subtype">
+ <field name="name">close</field>
+ <field name="model_ids" eval="[(4,ref('project.model_project_project'))]"/>
+ </record>
+ <record id="mail.mail_subtype_cancel" model="mail.message.subtype">
+ <field name="name">cancel</field>
+ <field name="model_ids" eval="[(4,ref('project.model_project_project'))]"/>
+ <field name="default" eval="False"/>
+ </record>
+ <record id="mail.mail_subtype_stage_change" model="mail.message.subtype">
+ <field name="name">stage change</field>
+ <field name="model_ids" eval="[(4,ref('project.model_project_task'))]"/>
+ <field name="default" eval="False"/>
+ </record>
+ <record id="mail.mail_subtype_draft" model="mail.message.subtype">
+ <field name="name">draft</field>
+ <field name="model_ids" eval="[(4,ref('project.model_project_task'))]"/>
+ </record>
+ <record id="mail.mail_subtype_email" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('project.model_project_project')),(4,ref('project.model_project_task'))]"/>
+ </record>
+ <record id="mail.mail_subtype_comment" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('project.model_project_project')),(4,ref('project.model_project_task'))]"/>
+ </record>
+ <record id="mail.mail_subtype_other" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('project.model_project_project')),(4,ref('project.model_project_task'))]"/>
+ </record>
<!-- notify all employees of module installation -->
<function model="mail.group" name="message_append_note">
_______________________________________________
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