diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
index b6644bf67..0207f32e2 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 @@
-
-
+
+
+