diff --git a/yuthon_holiday/models/inherit_hr_leave.py b/yuthon_holiday/models/inherit_hr_leave.py index ab8de5f52..499978de7 100644 --- a/yuthon_holiday/models/inherit_hr_leave.py +++ b/yuthon_holiday/models/inherit_hr_leave.py @@ -163,7 +163,7 @@ class HolidaysRequestBatch(models.Model): self.leave_ids.action_validate() self.hour_leave_ids.action_validate() - @api.onchange('is_day', 'is_hour') + @api.onchange('is_day', 'is_hour', 'users_id') def _onchange_name(self): employee_name = self.users_id.name if self.is_day or self.is_hour: diff --git a/yuthon_holiday/views/hr_leave_batch.xml b/yuthon_holiday/views/hr_leave_batch.xml index fa21e3de1..52d659819 100644 --- a/yuthon_holiday/views/hr_leave_batch.xml +++ b/yuthon_holiday/views/hr_leave_batch.xml @@ -52,13 +52,11 @@ + - - - diff --git a/yuthon_hr_attendance/models/card_approval.py b/yuthon_hr_attendance/models/card_approval.py index 344ae09ee..19f560755 100644 --- a/yuthon_hr_attendance/models/card_approval.py +++ b/yuthon_hr_attendance/models/card_approval.py @@ -29,7 +29,6 @@ class CardApprovals(models.Model): active = fields.Boolean('Active', default=True) urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', default='normal') - active = fields.Boolean('Active', default=True, tracking=True) def _get_default_name_title(self): return self._description if self._description else self._name @@ -87,7 +86,7 @@ class CardApprovals(models.Model): if rec.attendance_id.check_out: rec.attendance_id.check_out = rec.attendance_id.check_in.replace(hour=max_hour, minute=max_minute) - timedelta(hours=8) else: - rec.attendance_id.check_out = current_datetime.replace(hour=min_hour, minute=min_minute) - timedelta(hours=8) + rec.attendance_id.check_out = current_datetime.replace(hour=max_hour, minute=max_minute) - timedelta(hours=8) rec.attendance_id.is_approval = True rec.attendance_id.is_abnormal = False diff --git a/yuthon_hr_attendance/views/card_approval.xml b/yuthon_hr_attendance/views/card_approval.xml index 2d6403ad6..bbb64dfac 100644 --- a/yuthon_hr_attendance/views/card_approval.xml +++ b/yuthon_hr_attendance/views/card_approval.xml @@ -39,30 +39,15 @@ - - + + + + + + + - - - - - - - - - - - - - - - - - - - - diff --git a/yuthon_hr_employee_approval/models/yuthon_service_approval.py b/yuthon_hr_employee_approval/models/yuthon_service_approval.py index 0e28fcc9b..604fa8409 100644 --- a/yuthon_hr_employee_approval/models/yuthon_service_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_service_approval.py @@ -10,16 +10,15 @@ class YuthonServiceApproval(models.Model): name = fields.Char(string='标题') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('yuthon_service_approval_code')) - service_type = fields.Selection([('done', '在职证明'), ('leaving', '离职证明'), ('income', '收入类型')], string="服务类型") + service_type = fields.Selection([('done', '在职证明'), ('leaving', '离职证明'), ('income', '收入证明')], string="服务类型") users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) documents_ids = fields.Many2many('ir.attachment', string="附件") department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") employee_id = fields.Many2one('hr.employee', string="员工姓名") tenant_user_card = fields.Many2one('ir.attachment', string="身份证") - onboarding_time = fields.Date(string="入职时间") - job_id = fields.Many2one('hr.job', string="岗位") + onboarding_time = fields.Date(related='employee_id.open_start_time',string="入职时间") + job_id = fields.Many2one(related='employee_id.job_id', string="岗位") reason_issuance = fields.Char(string="开证原因") - issue_text = fields.Html(string="正文") is_issues = fields.Boolean(string='是否上会') related_issues_id = fields.Many2one('issue.library', string="关联议题") urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', @@ -47,3 +46,8 @@ class YuthonServiceApproval(models.Model): }) elif self.related_issues_id: raise UserError("已经创建了相关的上会记录,不能取消勾选") + + @api.onchange('service_type') + def _onchange_service_type(self): + if self.service_type: + self.name = self.users_id.name + '-' + self.service_type.name diff --git a/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml b/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml index 389203402..3039f0f91 100644 --- a/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml +++ b/yuthon_hr_employee_approval/views/yuthon_service_approval_views.xml @@ -47,16 +47,13 @@ - - - - - + + diff --git a/yuthon_maintain/models/property_report_repair.py b/yuthon_maintain/models/property_report_repair.py index c756a2c9b..67cbe10a7 100644 --- a/yuthon_maintain/models/property_report_repair.py +++ b/yuthon_maintain/models/property_report_repair.py @@ -32,11 +32,8 @@ class PropertyRentRelief(models.Model): list_quotations = fields.Many2one('ir.attachment', string="报价清单") invoice_id = fields.Many2one('ir.attachment', string="发票附件") - hardware_parts = fields.Char(string="更换部件") - hardware_fee = fields.Float(string="部件费用") - - software_parts = fields.Char(string="软件名称/版本") - software_fee = fields.Float(string="软件费用") + parts = fields.Char(string="软件名称/更换部件") + fee = fields.Float(string="费用") service_fee = fields.Float(string="服务费") service_fee_total = fields.Float(string="总费用") @@ -48,6 +45,14 @@ class PropertyRentRelief(models.Model): warehouse_management = fields.Char(string="库管") total = fields.Float(string="总价") remake = fields.Text(string="备注") + urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度', + default='normal') + active = fields.Boolean('Active', default=True, tracking=True) + + def _get_default_name_title(self): + return self._description if self._description else self._name + + name_title = fields.Char(default=_get_default_name_title) @api.onchange('users_id', 'fault') def _onchange_users_id(self): diff --git a/yuthon_maintain/views/property_report_repair.xml b/yuthon_maintain/views/property_report_repair.xml index a522a6354..06377858b 100644 --- a/yuthon_maintain/views/property_report_repair.xml +++ b/yuthon_maintain/views/property_report_repair.xml @@ -16,9 +16,26 @@ - - + + + + + + + + + + + + + + + + @@ -41,7 +58,6 @@ - @@ -52,12 +68,9 @@ - - - - - - + + +