[FIX] hr_contract_salary: Fix Offer model bugs
- Employee smartbutton should not be displayed if contract is not double signed - Inactive contracts should not be displayed - Fix some translations task-3471583 closes odoo/odoo#135689 X-original-commit: 856fbe7e180ababddab9cbd78dc9c43b749b83bd Related: odoo/enterprise#47485 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
@@ -79,6 +79,7 @@ class Applicant(models.Model):
|
||||
delay_close = fields.Float(compute="_compute_day", string='Delay to Close', readonly=True, group_operator="avg", help="Number of days to close", store=True)
|
||||
color = fields.Integer("Color Index", default=0)
|
||||
emp_id = fields.Many2one('hr.employee', string="Employee", help="Employee linked to the applicant.", copy=False)
|
||||
emp_is_active = fields.Boolean(string="Employee Active", related='emp_id.active')
|
||||
user_email = fields.Char(related='user_id.email', string="User Email", readonly=True)
|
||||
attachment_number = fields.Integer(compute='_get_attachment_number', string="Number of Attachments")
|
||||
employee_name = fields.Char(related='emp_id.name', string="Employee Name", readonly=False, tracking=False)
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
<field name="email_normalized" invisible="1"/>
|
||||
<field name="partner_phone_sanitized" invisible="1"/>
|
||||
<field name="partner_mobile_sanitized" invisible="1"/>
|
||||
<field name="emp_is_active" invisible="1"/>
|
||||
<header>
|
||||
<button string="Create Employee" name="create_employee_from_applicant" type="object" data-hotkey="q" groups="hr_recruitment.group_hr_recruitment_user"
|
||||
class="o_create_employee" invisible="emp_id or not active or not date_closed"/>
|
||||
@@ -79,7 +80,7 @@
|
||||
class="oe_stat_button"
|
||||
icon="fa-id-card-o"
|
||||
groups="hr.group_hr_user"
|
||||
invisible="not emp_id">
|
||||
invisible="not (emp_id or emp_is_active)">
|
||||
<div class="o_field_widget o_stat_info">
|
||||
<span class="o_stat_value"><field name="employee_name" readonly="1"/></span>
|
||||
<span class="o_stat_text">Employee</span>
|
||||
|
||||
Reference in New Issue
Block a user