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

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-menu-hr-subtype-kbh/+merge/135093
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-menu-hr-subtype-kbh/+merge/135093
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-menu-hr-subtype-kbh.
=== modified file 'hr/hr_data.xml'
--- hr/hr_data.xml	2012-11-14 11:55:04 +0000
+++ hr/hr_data.xml	2012-11-20 09:43:24 +0000
@@ -18,5 +18,26 @@
             <field name="user_id" ref="base.user_root"/>
         </record>
 
+    <record id="mt_new_applicant" model="mail.message.subtype">
+        <field name="name">New Applicant</field>
+        <field name="res_model">hr.job</field>
+        <field name="default" eval="False"/>
+    </record>
+    <record id="mt_stage_changed" model="mail.message.subtype">
+        <field name="name">Stage changed</field>
+        <field name="res_model">hr.job</field>
+        <field name="default" eval="False"/>
+    </record>
+    <record id="mt_applicant_hired" model="mail.message.subtype">
+        <field name="name">Applicant Hired</field>
+        <field name="res_model">hr.job</field>
+        <field name="default" eval="False"/>
+    </record>
+    <record id="mt_applicant_refused" model="mail.message.subtype">
+        <field name="name">Applicant Refused</field>
+        <field name="res_model">hr.job</field>
+        <field name="default" eval="False"/>
+    </record>
+
     </data>
 </openerp>

=== modified file 'hr_expense/hr_expense_data.xml'
--- hr_expense/hr_expense_data.xml	2012-11-14 11:55:04 +0000
+++ hr_expense/hr_expense_data.xml	2012-11-20 09:43:24 +0000
@@ -17,5 +17,24 @@
             <field name="parent_id" ref="product.product_category_all"/>
             <field name="name">Expenses</field>
         </record>
+
+        <!--subtype for expense -->
+        <record id="mt_expense_approve" model="mail.message.subtype">
+            <field name="name">To Approve</field>
+            <field name="res_model">hr.expense.expense</field>
+            <field name="default" eval="False"/>
+        </record>
+
+        <record id="mt_expense_approved" model="mail.message.subtype">
+            <field name="name">Approved</field>
+            <field name="res_model">hr.expense.expense</field>
+            <field name="default" eval="False"/>
+        </record>
+
+        <record id="mt_expense_refused" model="mail.message.subtype">
+            <field name="name">Refused</field>
+            <field name="res_model">hr.expense.expense</field>
+            <field name="default" eval="False"/>
+        </record>
     </data>
 </openerp>

=== modified file 'hr_holidays/hr_holidays.py'
--- hr_holidays/hr_holidays.py	2012-11-15 12:38:51 +0000
+++ hr_holidays/hr_holidays.py	2012-11-20 09:43:24 +0000
@@ -431,7 +431,7 @@
     def holidays_confirm_notificate(self, cr, uid, ids, context=None):
         for obj in self.browse(cr, uid, ids):
             self.message_post(cr, uid, [obj.id],
-                _("Request <b>submitted</b>, waiting for validation by the manager."), context=context)
+                _("Request <b>submitted</b>, waiting for validation by the manager."), subtype="hr_holidays.mt_approve", context=context)
 
     def holidays_first_validate_notificate(self, cr, uid, ids, context=None):
         for obj in self.browse(cr, uid, ids, context=context):
@@ -445,12 +445,12 @@
                     _("Request <b>validated</b>."), context=context)
             else:
                 self.message_post(cr, uid, [obj.id],
-                    _("The request has been <b>approved</b>."), context=context)
+                    _("The request has been <b>approved</b>."), subtype="hr_holidays.mt_approved", context=context)
 
     def holidays_refuse_notificate(self, cr, uid, ids, context=None):
         for obj in self.browse(cr, uid, ids):
             self.message_post(cr, uid, [obj.id],
-                _("Request <b>refused</b>"), context=context)
+                _("Request <b>refused</b>"), subtype="hr_holidays.mt_refused", context=context)
 
 
 class resource_calendar_leaves(osv.osv):

=== modified file 'hr_holidays/hr_holidays_data.xml'
--- hr_holidays/hr_holidays_data.xml	2012-11-14 11:55:04 +0000
+++ hr_holidays/hr_holidays_data.xml	2012-11-20 09:43:24 +0000
@@ -44,5 +44,25 @@
             <field name="limit">True</field>
             <field name="color_name">brown</field>
         </record>
+
+        <!--subtype for leaves -->
+        <record id="mt_approve" model="mail.message.subtype">
+            <field name="name">To Approve</field>
+            <field name="res_model">hr.holidays</field>
+            <field name="default" eval="False"/>
+        </record>
+
+        <record id="mt_approved" model="mail.message.subtype">
+            <field name="name">Approved</field>
+            <field name="res_model">hr.holidays</field>
+            <field name="default" eval="False"/>
+        </record>
+
+        <record id="mt_refused" model="mail.message.subtype">
+            <field name="name">Refused</field>
+            <field name="res_model">hr.holidays</field>
+            <field name="default" eval="False"/>
+        </record>
+
     </data>
 </openerp>

=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py	2012-11-19 14:42:36 +0000
+++ hr_recruitment/hr_recruitment.py	2012-11-20 09:43:24 +0000
@@ -473,7 +473,7 @@
         """ Override of the (void) default notification method. """
         if not stage_id: return True
         stage_name = self.pool.get('hr.recruitment.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="hr_recruitment.mt_stage_changed", context=context)
 
     def case_get_note_msg_prefix(self, cr, uid, id, context=None):
         return 'Applicant'
@@ -493,12 +493,12 @@
                 self.message_post(cr, uid, [applicant.id], body=message, context=context)
             else:
                 message = _("Applicant has been <b>hired</b>.")
-                self.message_post(cr, uid, [applicant.id], body=message, context=context)
+                self.message_post(cr, uid, [applicant.id], body=message, subtype="hr_recruitment.mt_applicant_hired", context=context)
         return True
 
     def case_cancel_send_note(self, cr, uid, ids, context=None):
         msg = 'Applicant <b>refused</b>.'
-        return self.message_post(cr, uid, ids, body=msg, context=context)
+        return self.message_post(cr, uid, ids, body=msg, subtype="hr_recruitment.mt_applicant_refused",context=context)
 
     def case_reset_send_note(self,  cr, uid, ids, context=None):
         message =_("Applicant has been set as <b>new</b>.")

=== modified file 'hr_recruitment/hr_recruitment_data.xml'
--- hr_recruitment/hr_recruitment_data.xml	2012-11-15 15:09:45 +0000
+++ hr_recruitment/hr_recruitment_data.xml	2012-11-20 09:43:24 +0000
@@ -470,5 +470,20 @@
         <field name="name">New Applicant</field>
         <field name="res_model">hr.job</field>
     </record>
+    <record id="mt_stage_changed" model="mail.message.subtype">
+        <field name="name">Stage changed</field>
+        <field name="res_model">hr.applicant</field>
+        <field name="default" eval="False"/>
+    </record>
+    <record id="mt_applicant_hired" model="mail.message.subtype">
+        <field name="name">Applicant Hired</field>
+        <field name="res_model">hr.applicant</field>
+        <field name="default" eval="False"/>
+    </record>
+    <record id="mt_applicant_refused" model="mail.message.subtype">
+        <field name="name">Applicant Refused</field>
+        <field name="res_model">hr.applicant</field>
+        <field name="default" eval="False"/>
+    </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