mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-25 20:52:05 +02:00
19.0 vanilla
This commit is contained in:
parent
a1137a1456
commit
e1d89e11e3
2789 changed files with 1093187 additions and 605897 deletions
|
|
@ -0,0 +1,3 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import hr_departure_wizard
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# 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
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="hr_departure_wizard_view_form" model="ir.ui.view">
|
||||
<field name="name">hr.departure.wizard.view.form.extend</field>
|
||||
<field name="model">hr.departure.wizard</field>
|
||||
<field name="inherit_id" ref="hr.hr_departure_wizard_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='activities_label']" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='activities']" position="attributes">
|
||||
<attribute name="invisible">0</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[@id='activities']" position="inside">
|
||||
<div><field name="unassign_equipment"/><label for="unassign_equipment" string="Equipment"/></div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue