Merge pull request !777 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2024-12-15 11:28:58 +00:00
committed by Gitee
4 changed files with 4 additions and 15 deletions
@@ -58,9 +58,3 @@ class HrContract(models.Model):
"view_mode": "form",
"target": "new",
}
def refresh_contract_action(self):
resource_calendar_id = self.env['resource.calendar'].search([('name', '=', '行政考勤')], limit=1)
for rec in self:
rec.write({
'resource_calendar_id': resource_calendar_id.id,})
@@ -81,11 +81,4 @@
<field name="state">code</field>
<field name="code">action = model.action_hr_contract()</field>
</record>
<record id="all_refresh_user_contract" model="ir.actions.server">
<field name="name">刷新合同</field>
<field name="model_id" ref="hr_contract.model_hr_contract"/>
<field name="binding_model_id" ref="hr_contract.model_hr_contract"/>
<field name="state">code</field>
<field name="code">action = model.refresh_contract_action()</field>
</record>
</odoo>
@@ -34,6 +34,7 @@ class YuthonContractWizard(models.Model):
wage_id = self.env['hr.salary.rule'].search([('struct_id.name', '=', structure_type_id.name),
('yuthon_company', '=', 'thtz'),
('name', '=', '基本工资')])
resource_calendar_id = self.env['resource.calendar'].search([('name', '=', '行政考勤')], limit=1)
wage = wage_id.amount_fix
self.env['hr.contract'].create({
'employee_id': employee_id.id,
@@ -41,6 +42,7 @@ class YuthonContractWizard(models.Model):
'party_id':party_id.id,
'contract_type_id':contract_type_id.id,
'wage':wage,
'state':'open'
'state':'open',
'resource_calendar_id':resource_calendar_id.id
})
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<data noupdate="1">
<record forcecreate="True" id="attendance_time_data" model="ir.cron">
<field name="name">定时任务:检查考勤是否异</field>
<field name="model_id" ref="model_hr_attendance"/>