Randhir Mayatra (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa-demo_project-rma
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-demo_project-rma/+merge/122635
Hello Sir,
I have add the subtype data into project ans project_issue module.
Thank you..
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-message-sub-type-apa-demo_project-rma/+merge/122635
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa.
=== modified file 'project/project.py'
--- project/project.py 2012-09-03 10:06:34 +0000
+++ project/project.py 2012-09-04 09:03:31 +0000
@@ -525,11 +525,11 @@
def set_cancel_send_note(self, cr, uid, ids, context=None):
message = _("Project has been <b>cancelled</b>.")
- return self.message_post(cr, uid, ids, body=message, subtype="cancel", context=context)
+ return self.message_post(cr, uid, ids, body=message, subtype="cancelled", context=context)
def set_close_send_note(self, cr, uid, ids, context=None):
message = _("Project has been <b>closed</b>.")
- return self.message_post(cr, uid, ids, body=message, subtype="close", context=context)
+ return self.message_post(cr, uid, ids, body=message, subtype="closed", context=context)
def write(self, cr, uid, ids, vals, context=None):
# if alias_model has been changed, update alias_model_id accordingly
=== modified file 'project/project_data.xml'
--- project/project_data.xml 2012-08-31 05:02:30 +0000
+++ project/project_data.xml 2012-09-04 09:03:31 +0000
@@ -99,12 +99,12 @@
<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>
+ <record id="mail.mail_subtype_closed" model="mail.message.subtype">
+ <field name="name">closed</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>
+ <record id="mail.mail_subtype_cancelled" model="mail.message.subtype">
+ <field name="name">cancelled</field>
<field name="model_ids" eval="[(4,ref('project.model_project_project'))]"/>
<field name="default" eval="False"/>
</record>
=== modified file 'project_issue/project_issue.py'
--- project_issue/project_issue.py 2012-08-31 07:40:32 +0000
+++ project_issue/project_issue.py 2012-09-04 09:03:31 +0000
@@ -500,7 +500,7 @@
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_post(cr, uid, ids, body= _("Stage changed to <b>%s</b>.") % (stage_name), context=context)
+ return self.message_post(cr, uid, ids, body= _("Stage changed to <b>%s</b>.") % (stage_name), subtype="stage change", context=context)
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
""" Override of default prefix for notifications. """
@@ -508,11 +508,11 @@
def convert_to_task_send_note(self, cr, uid, ids, context=None):
message = _("Project issue <b>converted</b> to task.")
- return self.message_post(cr, uid, ids, body=message, context=context)
+ return self.message_post(cr, uid, ids, body=message, subtype="converted", context=context)
def create_send_note(self, cr, uid, ids, context=None):
message = _("Project issue <b>created</b>.")
- return self.message_post(cr, uid, ids, body=message, context=context)
+ return self.message_post(cr, uid, ids, body=message, subtype="new", context=context)
def case_escalate_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
=== modified file 'project_issue/project_issue_data.xml'
--- project_issue/project_issue_data.xml 2012-08-30 14:18:52 +0000
+++ project_issue/project_issue_data.xml 2012-09-04 09:03:31 +0000
@@ -30,7 +30,32 @@
<record model="project.issue.version" id="type3">
<field name="name">v3.0</field>
</record>
-
+
+ <!--Sub type Data -->
+ <record id="mail.mail_subtype_new" model="mail.message.subtype">
+ <field name="name">new</field>
+ <field name="model_ids" eval="[(4,ref('project_issue.model_project_issue'))]"/>
+ <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_issue.model_project_issue'))]"/>
+ <field name="default" eval="False"/>
+ </record>
+ <record id="mail.mail_subtype_converted" model="mail.message.subtype">
+ <field name="name">converted</field>
+ <field name="model_ids" eval="[(4,ref('project_issue.model_project_issue'))]"/>
+ <field name="default" eval="False"/>
+ </record>
+ <record id="mail.mail_subtype_email" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('project_issue.model_project_issue'))]"/>
+ </record>
+ <record id="mail.mail_subtype_comment" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('project_issue.model_project_issue'))]"/>
+ </record>
+ <record id="mail.mail_subtype_other" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('project_issue.model_project_issue'))]"/>
+ </record>
<!-- notify all employees of module installation -->
<record model="mail.message" id="module_install_notification">
<field name="model">mail.group</field>
_______________________________________________
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