From 66656006a8a1c536ae34084faf3905500237a129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Tue, 23 Dec 2025 10:20:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../models/yuthon_vacation_reports.py | 16 +++++----------- .../views/yuthon_vacation_reports_views.xml | 9 +-------- .../models/property_lease_contract.py | 6 +----- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/yuthon_hr_attendance/models/yuthon_vacation_reports.py b/yuthon_hr_attendance/models/yuthon_vacation_reports.py index 8bfc5f80e..41be3fe6d 100644 --- a/yuthon_hr_attendance/models/yuthon_vacation_reports.py +++ b/yuthon_hr_attendance/models/yuthon_vacation_reports.py @@ -256,17 +256,11 @@ class YuthonVacationReports(models.Model): }) def update_data(self): - august_start = fields.Date.from_string('2025-09-01') - august_end = fields.Date.from_string('2025-9-30') - august_records = self.env["yuthon.vacation.reports"].search([ - ('vacation_date', '>=', august_start), - ('vacation_date', '<=', august_end) - ]) - if august_records: - august_records.write({ - 'vacation_date': august_start - }) - + records = self.env["yuthon.vacation.reports"].browse( + self._context.get('active_ids', self._context.get('active_id', self.ids)) + ) + for rec in records: + rec._compute_working_overtime() @api.depends('other_fee_ids', 'other_fee_ids.holiday_type', 'other_fee_ids.lines', 'other_fee_ids.is_void', 'other_fee_ids.update_type') diff --git a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml index 5098603cf..36e415b82 100644 --- a/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml +++ b/yuthon_hr_attendance/views/yuthon_vacation_reports_views.xml @@ -467,13 +467,6 @@ (0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_hr_attendance.view_yuthon_vacation_my_reports_tree')}), (0, 0, {'view_mode': 'form', 'view_id': ref('yuthon_hr_attendance.view_yuthon_vacation_reports_form1')})]"/> - - 更新报表 - - - code - action = model.update_vacation() - 初始化日志 @@ -496,7 +489,7 @@ action = model._compute_attendance_fields1() - 更新日期 + 更新报表 code diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index eea9a0e05..8dca40354 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -499,11 +499,7 @@ class PropertyLeaseContract(models.Model): 'code': self.code, 'approval_date': fields.Datetime.now(), }) - - def _get_default_name_title(self): - return self._description if self._description else self._name - - name_title = fields.Char(default=_get_default_name_title) + name_title = fields.Char(string="租赁合同审批") contract_sort = fields.Selection([('property', '物业'), ('guanggao', '广告位'),('parking', '停车场'), ('guanzi', '管子间'), ('room', '机房'), ('base_station','基站'), ('other', '其他')], string="资产类型", default='property')