mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-26 08:12:04 +02:00
15 lines
546 B
Python
15 lines
546 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import Command, fields, models
|
|
|
|
|
|
class HrDepartureWizard(models.TransientModel):
|
|
_inherit = 'hr.departure.wizard'
|
|
|
|
unassign_equipment = fields.Boolean("Free Equiments", default=True, help="Unassign Employee from Equipments")
|
|
|
|
def action_register_departure(self):
|
|
action = super().action_register_departure()
|
|
if self.unassign_equipment:
|
|
self.employee_ids.write({'equipment_ids': [Command.clear()]})
|
|
return action
|