diff --git a/soong_workflow/wizard/soong_workflow_comment_wizard.py b/soong_workflow/wizard/soong_workflow_comment_wizard.py index 5e970b9a6..fd1bf125d 100644 --- a/soong_workflow/wizard/soong_workflow_comment_wizard.py +++ b/soong_workflow/wizard/soong_workflow_comment_wizard.py @@ -451,6 +451,8 @@ class SoongWorkflowCommentWizard(models.TransientModel): if hasattr(related_record, 'self_users_ids'): user_ids = [employee.user_id.id for employee in self.employee_ids if employee.user_id] related_record.self_users_ids = [(6, 0, user_ids)] if user_ids else [(5,)] + if not self.trans_link_id.name: + raise UserError('无转交节点') record_id.write({'state': self.trans_link_id.name}) if self.circulated_employee_ids: workflow_record_id.is_log2 = True diff --git a/yuthon_contract/__manifest__.py b/yuthon_contract/__manifest__.py index b3ef55074..efa983a9b 100644 --- a/yuthon_contract/__manifest__.py +++ b/yuthon_contract/__manifest__.py @@ -13,7 +13,6 @@ 'depends': ['hr_contract', 'yuthon_hr_employee', 'base', 'yuthon_salary'], 'data': [ 'security/ir.model.access.csv', - 'security/company_rule.xml', 'data/contract_code_data.xml', 'wizard/yuthon_contract_wizard_views.xml', 'views/inherit_hr_contract_views.xml', diff --git a/yuthon_contract/security/company_rule.xml b/yuthon_contract/security/company_rule.xml deleted file mode 100644 index 6df160813..000000000 --- a/yuthon_contract/security/company_rule.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - 合同多公司 - - [('company_id', 'in', company_ids)] - - \ No newline at end of file diff --git a/yuthon_hr_attendance/controllers/portal.py b/yuthon_hr_attendance/controllers/portal.py index 6ab0e0864..37728d31a 100644 --- a/yuthon_hr_attendance/controllers/portal.py +++ b/yuthon_hr_attendance/controllers/portal.py @@ -115,17 +115,8 @@ class CustomerPortal(portal.CustomerPortal): @http.route('/phone/vacation/self/status', type='http', auth="none", csrf=False, cors='*') def phone_vacation_self_status(self, **kw): record_id = request.env['yuthon.vacation.reports'].sudo().search([('id', '=', kw.get('id'))]) - month_start = record_id.vacation_date.replace(day=1) - month_end = (month_start + relativedelta(months=1) - relativedelta(days=1)) - attendance_exception = self.env['hr.attendance'].search([ - ('employee_id', '=', record_id.employee_id.id), - ('current_data', '>=', month_start), - ('current_data', '<=', month_end), - ('is_abnormal', '=', True) - ], limit=1) - # 如果考勤异常,则不自动确认 - if attendance_exception: - return json.dumps({'code': 200, 'message': '考勤异常,请先核对考勤记录'}) + if record_id.is_abnormal: + return json.dumps({'code': 500, 'message': '考勤异常,请先核对考勤记录'}) else: record_id.write({'vacation_state': 'confirmed'}) return json.dumps({'code': 200, 'message': 'OK'}) diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml index e6db0e4c9..10bee0c6f 100644 --- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml +++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml @@ -49,19 +49,6 @@ - - - - - - - - - - - - - @@ -94,6 +81,19 @@ + + + + + + + + + + + + +