From f03de6cc7c7ea78e8338c3a59229eff0ed72d9ab 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: Thu, 23 Oct 2025 18:34:59 +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
---
.../views/inherit_yuthon_property_views.xml | 2 +-
.../wizard/property_reconciliation_wizard.py | 14 +++++++++++---
.../property_reconciliation_wizard_views.xml | 5 +++--
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
index 1dd346850..47d325d0f 100644
--- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml
+++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
@@ -635,7 +635,7 @@
-
+
diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py
index b44ef692d..03a7250fc 100644
--- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py
+++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py
@@ -15,8 +15,8 @@ class PropertyReconciliationWizard(models.Model):
bank_branch = fields.Char('银行名称')
bank_id = fields.Many2one('property.bank.statements', string='银行流水')
- lessee_ids = fields.Many2many(related='bank_id.lessee_ids', string='承租方')
- name_account = fields.Char(related='bank_id.name_account', string='对方户名')
+ lessee_ids = fields.Many2many('property.tenant.information', string='承租方')
+ name_account = fields.Char( string='对方户名')
account = fields.Char(string='账号')
amount_been_reconciled = fields.Float(string='已对金额', store=True)
amount_reconciled = fields.Float(string='未核销', store=True)
@@ -25,9 +25,17 @@ class PropertyReconciliationWizard(models.Model):
initial_total = fields.Float(string='初始金额', default=0.0)
rent = fields.Float(string='未收总租金', compute="_compute_rent_total")
penalty = fields.Float(string='未收总违约金', compute="_compute_penalty_total")
- remake = fields.Text(related='bank_id.remake', string='摘要')
+ remake = fields.Text(string='摘要')
reconciliation_line_ids = fields.One2many('property.reconciliation.line', 'reconciliation_id', string='对账明细')
+ @api.onchange('bank_id')
+ def _onchange_bank_id(self):
+ for rec in self:
+ rec.lessee_ids = rec.bank_id.lessee_ids.ids
+ rec.name_account = rec.bank_id.name_account
+ rec.remake = rec.bank_id.remake
+
+
@api.onchange('reconciliation_line_ids', 'actual_total')
def _onchange_amount_reconciled(self):
for rec in self:
diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml b/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml
index eb96a99e8..503eb5b15 100644
--- a/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml
+++ b/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml
@@ -13,8 +13,9 @@
-
-
+
+
+