diff --git a/yuthon_hr_attendance/models/yuthon_duty_plan.py b/yuthon_hr_attendance/models/yuthon_duty_plan.py index 17b16dd5f..f9898ed90 100644 --- a/yuthon_hr_attendance/models/yuthon_duty_plan.py +++ b/yuthon_hr_attendance/models/yuthon_duty_plan.py @@ -63,6 +63,7 @@ class YuthonDutyPlan(models.Model): next_next_year = next_year next_next_month = next_month + 1 last_day_of_month = datetime(next_next_year, next_next_month, 1) + role_a = self.env['planning.role'].search([('name', '=', '联安粮库')], limit=1) role_template_a = self.env['planning.slot.template'].search([('planning_name', '=', '白班'), ('role_id', '=', role_a.id)]) role_template_b = self.env['planning.slot.template'].search([('planning_name', '=', '白值'), ('role_id', '=', role_a.id)]) @@ -115,7 +116,7 @@ class YuthonDutyPlan(models.Model): current_date2 += timedelta(days=1) for i in self.env['planning.slot'].search([('role_id.name', '=', '联安粮库'), ('template_id.planning_name', '=', '白班')]).sorted('start_datetime'): - date = i.start_datetime.date() + date = (i.start_datetime - timedelta(hours=8)).date() if not self.is_workday(date): i.sudo().unlink() diff --git a/yuthon_property_approval/wizard/penalty_line_wizard.py b/yuthon_property_approval/wizard/penalty_line_wizard.py index 4221c39f9..f676aba38 100644 --- a/yuthon_property_approval/wizard/penalty_line_wizard.py +++ b/yuthon_property_approval/wizard/penalty_line_wizard.py @@ -94,11 +94,9 @@ class PenaltyLineWizard(models.Model): if is_penalty: penalty_pay_count += 1 current_idx = penalty_pay_count - type_name = "违约金" else: rent_pay_count += 1 current_idx = rent_pay_count - type_name = "租金" pay_year = pay_date.year pay_month = pay_date.month @@ -124,14 +122,14 @@ class PenaltyLineWizard(models.Model): new_penalty_lines.append((0, 0, { 'date': pay_date, - 'remake': f'支付租金¥{pay_line.amount}', + 'remake': f'支付金额¥{pay_line.amount}', 'days_overdue': days_overdue, 'remaining_principal': remaining_principal, 'penalty': round(current_penalty, 2), })) management_type = penalty_type if is_penalty else rent_type - pay_remake = f'第{current_idx}次支付{type_name},金额:¥{pay_amount}' + pay_remake = f'第{current_idx}次支付金额:¥{pay_amount}' new_pay_lines.append((0, 0, { 'date': pay_date, 'amount': pay_amount,