From 72de7b5dbf6f9925620775c66e804e8a3bbb3b44 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: Mon, 20 Oct 2025 16:41:52 +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 --- yuthon_hr_attendance/views/overtime_approval.xml | 11 +++++++---- .../models/inherit_yuthon_property.py | 2 +- .../models/property_lease_contract.py | 1 + .../views/inherit_yuthon_property_views.xml | 2 +- .../wizard/binding_information_wizard.py | 6 ------ .../wizard/property_reconciliation_wizard.py | 8 ++------ 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/yuthon_hr_attendance/views/overtime_approval.xml b/yuthon_hr_attendance/views/overtime_approval.xml index 2278c84b6..2e0d83cae 100644 --- a/yuthon_hr_attendance/views/overtime_approval.xml +++ b/yuthon_hr_attendance/views/overtime_approval.xml @@ -78,10 +78,13 @@ - - - - + + + + + + + diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 2e4d94e9a..211ec3048 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -243,7 +243,7 @@ class PropertyBankStatements(models.Model): for statement in statements_ids: if statement.name: bank_account = self.env['property.bank.line'].search([ - ('bank', '=', statement.name) # 假设statement.name存储银行账号 + ('bank', '=', statement.name) ]) if bank_account.tenant_id: # 获取需要删除的合同明细行 diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index fafacac13..0a1b46246 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -27,6 +27,7 @@ class PropertyTenantLine(models.Model): _description = '物业承租方合同明细行' tenant_id = fields.Many2one('property.tenant.information', string="关联租户信息") + property_ids = fields.Many2many('yuthon.property', string="关联物业信息") # 数据库字段缺失 无实际意义 property_name = fields.Char(related='lease_contract_id.property_name', string="物业信息") lease_contract_id = fields.Many2one('property.lease.contract', string="合同编号") rent = fields.Float(related='lease_contract_id.rent', string="租金") diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml index 3ba7c6723..93ec15467 100644 --- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml +++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml @@ -643,7 +643,7 @@ property.bank.statements - + diff --git a/yuthon_property_approval/wizard/binding_information_wizard.py b/yuthon_property_approval/wizard/binding_information_wizard.py index 5fefa11e7..f6a2c6945 100644 --- a/yuthon_property_approval/wizard/binding_information_wizard.py +++ b/yuthon_property_approval/wizard/binding_information_wizard.py @@ -78,12 +78,6 @@ class BindingInformationWizard(models.Model): if self.bank_id.name: bank_ids = self.env['property.bank.statements'].search([('name', '=', self.bank_id.name)]) for bank_id in bank_ids: - if self.property_ids: - new_properties = self.property_ids - bank_id.property_ids - if new_properties: - bank_id.write({ - 'property_ids': [(4, prop.id) for prop in new_properties] - }) if self.contract_ids: new_contracts = self.contract_ids - bank_id.contract_ids if new_contracts: diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py index 34b98ece9..39f10f685 100644 --- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py +++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py @@ -429,10 +429,6 @@ class PropertyReconciliationWizard(models.Model): # 检查是否已有相同记录 existing_record = self.env['property.accounts.receivable'].search(check_domain) is_reconciliation = round(line.amount,2) == round(line.rent, 2) - if existing_record and existing_record.remark: - final_remark = f"{existing_record.remark}\n{line.remake}" - else: - final_remark = line.remake if not existing_record: domain2 = [ ('due_date', '=', line.due_date), @@ -450,7 +446,7 @@ class PropertyReconciliationWizard(models.Model): 'delivered1': line.amount, 'payout_date': rec.actual_date if (line.rent == line.amount and line.rent != 0) else None, 'original_amount': line.rent, - 'remark': final_remark, + 'remark': line.remake, 'reconciliation_time': fields.Datetime.now(), }) self.env['receivable.modify.line'].create({ @@ -466,7 +462,7 @@ class PropertyReconciliationWizard(models.Model): 'due_date_end': extract_end_date, 'is_reconciliation': is_reconciliation, 'payout_date': rec.actual_date if (line.rent == line.amount and line.rent != 0) else None, - 'remark': final_remark, + 'remark': line.remake, 'bank_id': rec.bank_id.id if line.amount != 0 else None, 'is_write': True if line.amount != 0 else None, 'reconciliation_time': fields.Datetime.now(),