From 185b32d57d197c6de7663e38186889206610e77a Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Fri, 8 Aug 2025 09:44:46 +0800 Subject: [PATCH 1/2] =?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 --- yuthon_hr_attendance/models/hr_attendance.py | 2 +- .../models/inherit_yuthon_property.py | 4 ++-- .../models/property_lease_contract.py | 4 ++-- .../views/property_lease_contract.xml | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 4e8320a94..acdf574ad 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -79,7 +79,7 @@ class HrAttendance(models.Model): } def compute_attendance_ids(self): - for att in self.env["hr.attendance.detail"].browse(self._context.get('active_ids', self._context.get('active_id'))): + for att in self.env["hr.attendance"].browse(self._context.get('active_ids', self._context.get('active_id'))): now_time = fields.Datetime.to_datetime(att.current_data) + timedelta(hours=8, days=1) start_time = now_time - timedelta(days=2) self.env["hr.attendance.detail"].get_hr_attendance_time(att.employee_id, now_time, start_time) diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 648c622c6..7f46c2fc4 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -539,7 +539,7 @@ class PropertyRentList(models.Model): if contract and contract.cycle_mode and due_date: due_date_obj = fields.Date.from_string(due_date) contract_actual_end = fields.Date.from_string( - contract.actual_start_time) if contract.actual_start_time else None + contract.actual_end_time) if contract.actual_end_time else None # 处理合同月 if contract.cycle_mode == 'fixed_monthly': # 计算理论应收结束日(当月最后一天) @@ -595,7 +595,7 @@ class PropertyRentList(models.Model): if contract and contract.cycle_mode and due_date: due_date_obj = fields.Date.from_string(due_date) contract_actual_end = fields.Date.from_string( - contract.actual_start_time) if contract.actual_start_time else None + contract.actual_end_time) if contract.actual_end_time else None # 处理合同月 if contract.cycle_mode == 'fixed_monthly': # 计算理论应收结束日(当月最后一天) diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 01177be3f..7f78e5705 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -183,7 +183,7 @@ class PropertyLeaseContract(models.Model): legal_entity_id = fields.Many2one('ir.attachment', string="身份证") power_attorney_id = fields.Many2one('ir.attachment', string="授权委托书") asset_valuation_id = fields.Many2one('ir.attachment', string="资产评估结果明细表") - lease_contract = fields.Many2one('ir.attachment', string="租赁合同(住宅)") + lease_contract = fields.Many2one('ir.attachment', string="合同/协议") confirmation_transaction_id = fields.Many2one('ir.attachment', string="成交确认书") responsibility_book_id = fields.Many2one('ir.attachment', string="安全生产责任书(住宅)") other_ment_ids = fields.Many2many( @@ -206,7 +206,7 @@ class PropertyLeaseContract(models.Model): license_name = fields.Char(string="营业执照名称", compute='_compute_attachment_names', store=True) legal_entity_name = fields.Char(string="身份证名称", compute='_compute_attachment_names', store=True) asset_valuation_name = fields.Char(string="资产评估结果明细表名称", compute='_compute_attachment_names') - lease_contract_name = fields.Char(string="租赁合同(住宅)名称", compute='_compute_attachment_names') + lease_contract_name = fields.Char(string="合同/协议", compute='_compute_attachment_names') confirmation_transaction_name = fields.Char(string="成交确认书名称", compute='_compute_attachment_names', store=True) responsibility_book_name = fields.Char(string="安全生产责任书(住宅)名称", compute='_compute_attachment_names', diff --git a/yuthon_property_approval/views/property_lease_contract.xml b/yuthon_property_approval/views/property_lease_contract.xml index c10fe72f5..579f1ecdc 100644 --- a/yuthon_property_approval/views/property_lease_contract.xml +++ b/yuthon_property_approval/views/property_lease_contract.xml @@ -562,16 +562,16 @@