payroll fixes
This commit is contained in:
parent
aecdbab7c2
commit
77827a188f
|
|
@ -110,10 +110,10 @@
|
|||
</group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="job_category" force_save="1"/>
|
||||
<field name="job_category" force_save="1" placeholder="Select Category"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="job_priority"/>
|
||||
<field name="job_priority" placeholder="Select Priority"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@
|
|||
<xpath expr="//notebook" position="before">
|
||||
<group>
|
||||
<field name="department_id"/>
|
||||
<field name="job_category"/>
|
||||
<field name="job_category" placeholder="Select Category"/>
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath expr="//notebook" position="inside">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<attribute name="required">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='job_id']" position="after">
|
||||
<field name="job_category" required="1" readonly="state not in ['draft']"/>
|
||||
<field name="job_category" placeholder="Select Category" required="1" readonly="state not in ['draft']"/>
|
||||
<field name="hr_job_recruitment" string="Job Recruitment ID" readonly="not is_hr or state == 'jd_created'" force_save="1" invisible="state not in ['final','jd_created']" options="{'no_quick_create': True, 'no_create_edit': True, 'no_open': True}"/>
|
||||
<field name="recruitment_status" widget="statusbar" readonly="1" force_save="1" invisible="not hr_job_recruitment" options="{'clickable': '1', 'fold_field': 'fold'}"/>
|
||||
</xpath>
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ class HrContract(models.Model):
|
|||
"""Get the default notice period from the configuration.
|
||||
:return: The default notice period in days.
|
||||
:rtype: int """
|
||||
return self.env['ir.config_parameter'].get_param(
|
||||
return self.env['ir.config_parameter'].sudo().get_param(
|
||||
'hr_employee_updation.no_of_days') if self.env[
|
||||
'ir.config_parameter'].get_param(
|
||||
'ir.config_parameter'].sudo().get_param(
|
||||
'hr_employee_updation.notice_period') else 0
|
||||
|
||||
notice_days = fields.Integer(string="Notice Period",
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@
|
|||
<field name="name">Applicant Offer Email Template</field>
|
||||
<field name="model_id" ref="offer_letters.model_offer_letter"/>
|
||||
<field name="email_from">{{ user.email_formatted }}</field>
|
||||
<field name="email_to">{{ object.candidate_id.email_from or '' }}</field>
|
||||
<field name="subject">Offer Letter - {{ object.position or object.candidate_id.job_id.name or '' }}</field>
|
||||
<field name="email_to">{{ object.main_candidate_id.email_from or '' }}</field>
|
||||
<field name="subject">Offer Letter - {{ object.position or object.main_candidate_id.job_id.name or '' }}</field>
|
||||
<field name="description">
|
||||
Send applicant offer mail with offer letter attachment.
|
||||
</field>
|
||||
<field name="body_html" type="html">
|
||||
<div style="margin: 0; padding: 0; font-size: 13px; line-height: 1.7;">
|
||||
<p>Dear <t t-esc="object.candidate_id.partner_name or ''"/>,</p>
|
||||
<p>Dear <t t-esc="object.main_candidate_id.partner_name or ''"/>,</p>
|
||||
<p>
|
||||
With reference to the interview and subsequent discussions you had with us, we are pleased to select
|
||||
you for the position of "<t t-esc="object.position or ''"/>" in our organization with the following
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from odoo import models, fields, api, _
|
||||
from odoo.api import readonly
|
||||
from odoo.exceptions import UserError
|
||||
from collections import defaultdict
|
||||
from datetime import timedelta, datetime
|
||||
|
|
@ -26,8 +27,24 @@ class OfferLetter(models.Model):
|
|||
default=lambda self: _('New'),
|
||||
copy=False
|
||||
)
|
||||
candidate_id = fields.Many2one( 'hr.applicant', string='Candidate', required=True,
|
||||
candidate_id = fields.Many2one( 'hr.applicant', string='Applicant', required=False,
|
||||
)
|
||||
main_candidate_id = fields.Many2one('hr.candidate',string='Candidate', readonly=False, required=True)
|
||||
|
||||
@api.onchange('candidate_id')
|
||||
def _onchange_candidate_id(self):
|
||||
if self.candidate_id:
|
||||
self.main_candidate_id = self.candidate_id.candidate_id
|
||||
|
||||
main_candidate_name = fields.Char(compute="_compute_main_candidate_name", readonly=False)
|
||||
|
||||
@api.depends('candidate_id','main_candidate_id')
|
||||
def _compute_main_candidate_name(self):
|
||||
for rec in self:
|
||||
if rec.candidate_id:
|
||||
rec.main_candidate_name = rec.candidate_id.partner_name
|
||||
elif rec.main_candidate_id:
|
||||
rec.main_candidate_name = rec.main_candidate_id.partner_name
|
||||
requested_by_id = fields.Many2one('res.users', string='Requested By', readonly=True, tracking=True)
|
||||
request_date = fields.Datetime(string='Requested On', readonly=True, tracking=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@
|
|||
<div style="margin-bottom: 25px;">
|
||||
<strong>To,</strong>
|
||||
<br/>
|
||||
<strong t-esc="o.candidate_id.partner_name"/>
|
||||
<strong t-esc="o.main_candidate_id.partner_name"/>
|
||||
<br/>
|
||||
<div t-if="o.candidate_id.private_street and o.candidate_id.private_city">
|
||||
<div t-if="o.candidate_id and o.candidate_id.private_street and o.candidate_id.private_city">
|
||||
<t t-esc="o.candidate_id.private_street"/>
|
||||
<br/>
|
||||
<t t-esc="o.candidate_id.private_street2" t-if="o.candidate_id.private_street2"/>
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<!-- DEAR LINE -->
|
||||
<div style="margin-bottom: 20px;">
|
||||
<strong>Dear
|
||||
<t t-esc="o.candidate_id.partner_name"/>,
|
||||
<t t-esc="o.main_candidate_id.partner_name"/>,
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
|
|
@ -368,7 +368,7 @@
|
|||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<strong t-esc="o.candidate_id.partner_name"/>
|
||||
<strong t-esc="o.main_candidate_id.partner_name"/>
|
||||
<br/>
|
||||
<strong t-esc="o.position"/>
|
||||
<br/>
|
||||
|
|
@ -486,7 +486,7 @@
|
|||
<br/>
|
||||
<br/>
|
||||
<strong>Employee Name :
|
||||
<t t-esc="o.candidate_id.partner_name"/>
|
||||
<t t-esc="o.main_candidate_id.partner_name"/>
|
||||
</strong>
|
||||
<br/>
|
||||
<br/>
|
||||
|
|
@ -595,7 +595,7 @@
|
|||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
<strong t-esc="o.candidate_id.partner_name"/>
|
||||
<strong t-esc="o.main_candidate_id.partner_name"/>
|
||||
<br/>
|
||||
<strong t-esc="o.position"/>
|
||||
<br/>
|
||||
|
|
@ -621,7 +621,7 @@
|
|||
Company incorporated under Indian Companies Act 1956, having registered office in
|
||||
Hyderabad,
|
||||
India ("Company")
|
||||
<strong t-esc="o.candidate_id.partner_name"/>
|
||||
<strong t-esc="o.main_candidate_id.partner_name"/>
|
||||
(Recipient)
|
||||
</p>
|
||||
<p>Whereas "Company" wishes to explore the possibility of entering into an employment
|
||||
|
|
@ -875,7 +875,7 @@
|
|||
<strong t-esc="o.joining_date"/>
|
||||
</td>
|
||||
<td style="padding-top: 20px;">
|
||||
<strong t-esc="o.candidate_id.partner_name"/>
|
||||
<strong t-esc="o.main_candidate_id.partner_name"/>
|
||||
<br/>
|
||||
<strong t-esc="o.position"/>
|
||||
<br/>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="candidate_id"/>
|
||||
<field name="main_candidate_name"/>
|
||||
<field name="position"/>
|
||||
<field name="state"/>
|
||||
<field name="sent_date"/>
|
||||
|
|
@ -32,7 +32,9 @@
|
|||
<group>
|
||||
<group>
|
||||
<field name="name" readonly="state != 'requested'"/>
|
||||
<field name="candidate_id"/>
|
||||
<field name="main_candidate_name" invisible="1"/>
|
||||
<field name="candidate_id" invisible="not candidate_id" readonly="1" force_save="1"/>
|
||||
<field name="main_candidate_id" invisible="candidate_id" force_save="1"/>
|
||||
<field name="requested_by_id" readonly="1"/>
|
||||
<field name="request_date" readonly="1"/>
|
||||
<field name="manager_id"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue