[IMP] make changes into hr module for subtype data
bzr revid: rma@tinyerp.com-20120904094052-5povh2fua010g3ej
This commit is contained in:
parent
df3aa41ac4
commit
e50afb97b4
|
@ -370,26 +370,26 @@ class hr_holidays(osv.osv):
|
|||
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],
|
||||
_("The request has been <b>submitted</b> and is waiting for validation by the manager."), subtype="submitted", context=context)
|
||||
_("The request has been <b>submitted</b> and is waiting for validation by the manager."), context=context)
|
||||
|
||||
def holidays_first_validate_notificate(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
self.message_post(cr, uid, [obj.id],
|
||||
_("The request has been <b>approved</b>. A second validation is necessary and is now pending."), subtype="pending", context=context)
|
||||
_("The request has been <b>approved</b>. A second validation is necessary and is now pending."), context=context)
|
||||
|
||||
def holidays_validate_notificate(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids):
|
||||
if obj.double_validation:
|
||||
self.message_post(cr, uid, [obj.id],
|
||||
_("The request has been <b>double validated</b>. The validation process is now over."), subtype="double validated", context=context)
|
||||
_("The request has been <b>double validated</b>. The validation process is now over."), context=context)
|
||||
else:
|
||||
self.message_post(cr, uid, [obj.id],
|
||||
_("The request has been <b>approved</b>. The validation process is now over."), subtype="closed", context=context)
|
||||
_("The request has been <b>approved</b>. The validation process is now over."), subtype="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],
|
||||
_("The request has been <b>refused</b>. The validation process is now over."), subtype="cancelled", context=context)
|
||||
_("The request has been <b>refused</b>. The validation process is now over."), subtype="refused", context=context)
|
||||
|
||||
|
||||
class resource_calendar_leaves(osv.osv):
|
||||
|
|
|
@ -55,26 +55,12 @@ Once validated, they are visible in the employee's calendar. HR officers can def
|
|||
<field name="model_ids" eval="[(4,ref('hr_holidays.model_hr_holidays'))]"/>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_submitted" model="mail.message.subtype">
|
||||
<field name="name">submitted</field>
|
||||
<field name="model_ids" eval="[(4,ref('hr_holidays.model_hr_holidays'))]"/>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_pending" model="mail.message.subtype">
|
||||
<field name="name">pending</field>
|
||||
<field name="model_ids" eval="[(4,ref('hr_holidays.model_hr_holidays'))]"/>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_double_validated" model="mail.message.subtype">
|
||||
<field name="name">double validated</field>
|
||||
<record id="mail.mail_subtype_approved" model="mail.message.subtype">
|
||||
<field name="name">approved</field>
|
||||
<field name="model_ids" eval="[(4,ref('hr_holidays.model_hr_holidays'))]"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_closed" model="mail.message.subtype">
|
||||
<field name="name">closed</field>
|
||||
<field name="model_ids" eval="[(4,ref('hr_holidays.model_hr_holidays'))]"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_cancelled" model="mail.message.subtype">
|
||||
<field name="name">cancelled</field>
|
||||
<record id="mail.mail_subtype_refused" model="mail.message.subtype">
|
||||
<field name="name">refused</field>
|
||||
<field name="model_ids" eval="[(4,ref('hr_holidays.model_hr_holidays'))]"/>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
|
|
|
@ -475,12 +475,12 @@ class hr_applicant(base_stage, osv.Model):
|
|||
self.message_post(cr, uid, [applicant.id], body=message, subtype="closed", context=context)
|
||||
else:
|
||||
message = _("Applicant has been <b>hired</b>.")
|
||||
self.message_post(cr, uid, [applicant.id], body=message, subtype="closed", context=context)
|
||||
self.message_post(cr, uid, [applicant.id], body=message, subtype="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, subtype="cancelled", context=context)
|
||||
return self.message_post(cr, uid, ids, body=msg, subtype="refused", context=context)
|
||||
|
||||
def case_reset_send_note(self, cr, uid, ids, context=None):
|
||||
message =_("Applicant has been set as <b>new</b>.")
|
||||
|
|
|
@ -467,12 +467,12 @@ You can automatically receive job application though an email gateway, see the H
|
|||
<field name="model_ids" eval="[(4,ref('hr_recruitment.model_hr_applicant'))]"/>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_closed" model="mail.message.subtype">
|
||||
<field name="name">closed</field>
|
||||
<record id="mail.mail_subtype_hired" model="mail.message.subtype">
|
||||
<field name="name">hired</field>
|
||||
<field name="model_ids" eval="[(4,ref('hr_recruitment.model_hr_applicant'))]"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_cancelled" model="mail.message.subtype">
|
||||
<field name="name">cancelled</field>
|
||||
<record id="mail.mail_subtype_refused " model="mail.message.subtype">
|
||||
<field name="name">refused</field>
|
||||
<field name="model_ids" eval="[(4,ref('hr_recruitment.model_hr_applicant'))]"/>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue