Amit Patel (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-menu-sales-subtype-fka into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-menu-sales-subtype-fka/+merge/135049
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-menu-sales-subtype-fka/+merge/135049
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-menu-sales-subtype-fka.
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py	2012-11-19 12:56:13 +0000
+++ crm/crm_lead.py	2012-11-20 05:15:28 +0000
@@ -846,7 +846,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('crm.case.stage').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="crm.mt_lead_stage", context=context)
 
     def case_get_note_msg_prefix(self, cr, uid, lead, context=None):
         if isinstance(lead, (int, long)):
@@ -861,11 +861,11 @@
 
     def case_mark_lost_send_note(self, cr, uid, ids, context=None):
         message = _("Opportunity has been <b>lost</b>.")
-        return self.message_post(cr, uid, ids, body=message, context=context)
+        return self.message_post(cr, uid, ids, body=message, subtype="crm.mt_lead_lost", context=context)
 
     def case_mark_won_send_note(self, cr, uid, ids, context=None):
         message = _("Opportunity has been <b>won</b>.")
-        return self.message_post(cr, uid, ids, body=message, context=context)
+        return self.message_post(cr, uid, ids, body=message, subtype="crm.mt_lead_won", context=context)
 
     def schedule_phonecall_send_note(self, cr, uid, ids, phonecall_id, action, context=None):
         phonecall = self.pool.get('crm.phonecall').browse(cr, uid, [phonecall_id], context=context)[0]
@@ -882,7 +882,7 @@
 
     def convert_opportunity_send_note(self, cr, uid, lead, context=None):
         message = _("Lead has been <b>converted to an opportunity</b>.")
-        lead.message_post(body=message)
+        lead.message_post(body=message, subtype="crm.mt_lead_convert_to_opportunity")
         return True
 
     def onchange_state(self, cr, uid, ids, state_id, context=None):

=== modified file 'crm/crm_lead_data.xml'
--- crm/crm_lead_data.xml	2012-10-02 20:40:23 +0000
+++ crm/crm_lead_data.xml	2012-11-20 05:15:28 +0000
@@ -154,5 +154,49 @@
             <field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
         </record>
 
+        <record id="mt_lead_convert_to_opportunity" model="mail.message.subtype">
+            <field name="name">Convert to Opportunity</field>
+            <field name="res_model">crm.lead</field>
+        </record>
+
+        <record id="mt_lead_stage" model="mail.message.subtype">
+            <field name="name">Stage Changed</field>
+            <field name="res_model">crm.lead</field>
+        </record>
+
+        <record id="mt_lead_lost" model="mail.message.subtype">
+            <field name="name">Lost</field>
+            <field name="res_model">crm.lead</field>
+        </record>
+
+        <record id="mt_lead_won" model="mail.message.subtype">
+            <field name="name">Won</field>
+            <field name="res_model">crm.lead</field>
+        </record>
+
+        <record id="mt_salesteam_lead" model="mail.message.subtype">
+            <field name="name">Leads Created</field>
+            <field name="res_model">crm.case.section</field>
+        </record>
+
+        <record id="mt_salesteam_lead_opportunity" model="mail.message.subtype">
+            <field name="name">Leads to Opportunity</field>
+            <field name="res_model">crm.case.section</field>
+        </record>
+
+        <record id="mt_salesteam_stage" model="mail.message.subtype">
+            <field name="name">Leads Stage Changed</field>
+            <field name="res_model">crm.case.section</field>
+        </record>
+
+        <record id="mt_salesteam_lost" model="mail.message.subtype">
+            <field name="name">Opportunity Lost</field>
+            <field name="res_model">crm.case.section</field>
+        </record>
+
+        <record id="mt_salesteam_won" model="mail.message.subtype">
+            <field name="name">Opportunity Won</field>
+            <field name="res_model">crm.case.section</field>
+        </record>
     </data>
 </openerp>

=== modified file 'crm/crm_view.xml'
--- crm/crm_view.xml	2012-11-15 12:38:51 +0000
+++ crm/crm_view.xml	2012-11-20 05:15:28 +0000
@@ -131,7 +131,7 @@
                         </page>
                     </notebook>
                     <div class="oe_chatter">
-                        <field name="message_follower_ids" widget="mail_followers" help="Followers of this salesteam follow automatically all opportunities related to this salesteam."/>
+                        <field name="message_follower_ids" widget="mail_followers" help="Follow this salesteam to automatically track the events associated to users of this team."/>
                         <field name="message_ids" widget="mail_thread"/>
                     </div>
                 </form>

=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice.py'
--- hr_timesheet_invoice/hr_timesheet_invoice.py	2012-11-03 13:45:12 +0000
+++ hr_timesheet_invoice/hr_timesheet_invoice.py	2012-11-20 05:15:28 +0000
@@ -107,13 +107,13 @@
     def set_open(self, cr, uid, ids, context=None):
         self.write(cr, uid, ids, {'state': 'open'}, context=context)
         message = _("Contract has been <b>opened</b>.")
-        self.message_post(cr, uid, ids, body=message, context=context)
+        self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_renewed", context=context)
         return True
 
     def set_pending(self, cr, uid, ids, context=None):
         self.write(cr, uid, ids, {'state': 'pending'}, context=context)
         message = _("Contract has been set as <b>pending</b>.")
-        self.message_post(cr, uid, ids, body=message, context=context)
+        self.message_post(cr, uid, ids, body=message, subtype="hr_timesheet_invoice.mt_account_renew", context=context)
         return True
 
 account_analytic_account()

=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice_data.xml'
--- hr_timesheet_invoice/hr_timesheet_invoice_data.xml	2012-11-02 08:36:12 +0000
+++ hr_timesheet_invoice/hr_timesheet_invoice_data.xml	2012-11-20 05:15:28 +0000
@@ -24,13 +24,33 @@
 
         <!-- mail: subtypes -->
         <record id="mt_account_closed" model="mail.message.subtype">
-            <field name="name">finished</field>
+            <field name="name">Contract Finished</field>
+            <field name="res_model">account.analytic.account</field>
+        </record>
+        <record id="mt_account_renewed" model="mail.message.subtype">
+            <field name="name">Contract Renewed</field>
+            <field name="res_model">account.analytic.account</field>
+        </record>
+        <record id="mt_account_renew" model="mail.message.subtype">
+            <field name="name">Contract to Renew</field>
             <field name="res_model">account.analytic.account</field>
         </record>
         <record id="mt_account_canceled" model="mail.message.subtype">
             <field name="name">canceled</field>
             <field name="res_model">account.analytic.account</field>
         </record>
+        <record id="mt_salesteam_renew" model="mail.message.subtype">
+            <field name="name">Contract to Renew</field>
+            <field name="res_model">crm.case.section</field>
+        </record>
+        <record id="mt_salesteam_renewed" model="mail.message.subtype">
+            <field name="name">Contract Renewed</field>
+            <field name="res_model">crm.case.section</field>
+        </record>
+        <record id="mt_salesteam_finished" model="mail.message.subtype">
+            <field name="name">Contract Finished</field>
+            <field name="res_model">crm.case.section</field>
+        </record>
 
     </data>
 </openerp>

=== modified file 'sale/sale.py'
--- sale/sale.py	2012-11-15 12:38:51 +0000
+++ sale/sale.py	2012-11-20 05:15:28 +0000
@@ -679,7 +679,7 @@
 
     def confirm_send_note(self, cr, uid, ids, context=None):
         for obj in self.browse(cr, uid, ids, context=context):
-            self.message_post(cr, uid, [obj.id], body=_("Quotation for <em>%s</em> <b>converted</b> to Sale Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), context=context)
+            self.message_post(cr, uid, [obj.id], body=_("Quotation for <em>%s</em> <b>converted</b> to Sale Order of %s %s.") % (obj.partner_id.name, obj.amount_total, obj.pricelist_id.currency_id.symbol), subtype="sale.mt_order_confirmed", context=context)
 
     def cancel_send_note(self, cr, uid, ids, context=None):
         for obj in self.browse(cr, uid, ids, context=context):

=== modified file 'sale/sale_data.xml'
--- sale/sale_data.xml	2012-11-15 15:09:45 +0000
+++ sale/sale_data.xml	2012-11-20 05:15:28 +0000
@@ -43,5 +43,26 @@
             <field name="body"><![CDATA[<p>This application lets you create and send quotations and process your sales orders; from delivery to invoicing.</p>
 <p>If you need to manage your sales pipeline (leads, opportunities, phonecalls), the <i>CRM</i> application may be useful. Use the Settings menu to install it.</p>]]></field>
         </record>
+        
+        <!-- Subtype: sale.order -->
+        <record id="mt_quotation_sent" model="mail.message.subtype">
+            <field name="name">Quotation sent</field>
+            <field name="res_model">sale.order</field>
+        </record>
+
+        <record id="mt_order_confirmed" model="mail.message.subtype">
+            <field name="name">Sale Order Confirmed</field>
+            <field name="res_model">sale.order</field>
+        </record>
+
+        <record id="mt_salesteam_confirmed" model="mail.message.subtype">
+            <field name="name">Quotation sent</field>
+            <field name="res_model">crm.case.section</field>
+        </record>
+
+        <record id="mt_salesteam_confirmed" model="mail.message.subtype">
+            <field name="name">Sale Order Confirmed</field>
+            <field name="res_model">crm.case.section</field>
+        </record>
     </data>
 </openerp>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to