fix order tree list
This commit is contained in:
parent
7ebe35b7e2
commit
27e74c9a82
|
|
@ -15,6 +15,7 @@ class HrOfficialMission(models.Model):
|
|||
_rec_name = 'mission_type'
|
||||
_description = 'Official mission'
|
||||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_order = 'date_from desc'
|
||||
|
||||
date = fields.Date(default=lambda self: fields.Date.today())
|
||||
date_from = fields.Date()
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ class HrTermination(models.Model):
|
|||
_inherit = ['mail.thread', 'mail.activity.mixin']
|
||||
_rec_name = 'employee_id'
|
||||
_description = 'Termination'
|
||||
_order = 'last_work_date asc'
|
||||
|
||||
# default compute function
|
||||
def _get_employee_id(self):
|
||||
|
|
@ -436,7 +437,7 @@ class HrTermination(models.Model):
|
|||
self.allowance_deduction_ids = False
|
||||
rule_line = self.env['hr.salary.rule.line'].search([('allowance_deduction_inverse_id', '=', False)])
|
||||
if rule_line:
|
||||
rule_line.sudo().unlink()
|
||||
rule_line.sudo().unlink()
|
||||
|
||||
# Get all advantages from contract
|
||||
if self.sudo().contract_id:
|
||||
|
|
|
|||
Loading…
Reference in New Issue