添加功能
This commit is contained in:
@@ -303,6 +303,15 @@ class YuthonHrEmployee(models.Model):
|
||||
"target": "new",
|
||||
}
|
||||
|
||||
def action_hr_state(self):
|
||||
employee = self.env["hr.employee"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
for employee_id in employee:
|
||||
if employee_id.contract_id and employee_id.active == True:
|
||||
employee_id.sudo().write({
|
||||
'user_state': 'in'
|
||||
})
|
||||
|
||||
@api.depends('confirmation_date')
|
||||
def _compute_regularization_year(self):
|
||||
for record in self:
|
||||
|
||||
@@ -467,6 +467,13 @@
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.action_hr_time_form()</field>
|
||||
</record>
|
||||
<record id="all_data_write_employee_state" model="ir.actions.server">
|
||||
<field name="name">更新员工状态</field>
|
||||
<field name="model_id" ref="hr.model_hr_employee"/>
|
||||
<field name="binding_model_id" ref="hr.model_hr_employee"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.action_hr_state()</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="view_employee_form_inherit_hr_attendance" model="ir.ui.view">-->
|
||||
<!-- <field name="name">hr.employee.attendance.form</field>-->
|
||||
|
||||
Reference in New Issue
Block a user