Skip to content

Commit

Permalink
[hr_termination_transition]
Browse files Browse the repository at this point in the history
* Retrigger latest_career_transition_id on employee
  • Loading branch information
andhit-r committed Dec 20, 2018
1 parent e2b5b81 commit c0000a2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion hr_termination_transition/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import models, fields
from openerp import models, fields, api


class HrEmployee(models.Model):
_inherit = "hr.employee"

@api.multi
@api.depends(
"termination_transition_ids",
"termination_transition_ids.state",
)
def _compute_career_transition(self):
_super = super(HrEmployee, self)
_super._compute_career_transition()

termination_transition_ids = fields.One2many(
string="Termination Transitions",
comodel_name="hr.termination_transition",
Expand Down

0 comments on commit c0000a2

Please sign in to comment.