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..0ee8c674b 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', @@ -1355,7 +1355,7 @@ class PropertyLeaseContract(models.Model): "target": "new", "context": { 'default_lease_contract_id': self.id, - 'default_property_ids': property_ids2, + 'default_property_ids2': property_ids2, } } 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 @@