From 9ac86d3a62f888ef4bad3d12321c79c319330e32 Mon Sep 17 00:00:00 2001
From: zhou <123@>
Date: Mon, 30 Jun 2025 10:14:43 +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/property_bank_statements_views.xml | 4 ++--
.../models/inherit_yuthon_property.py | 6 ++++++
.../views/inherit_yuthon_property_views.xml | 11 +++++++++--
.../wizard/click_reconciliation_wizard.py | 5 ++---
4 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/yuthon_property/views/property_bank_statements_views.xml b/yuthon_property/views/property_bank_statements_views.xml
index e3a163ca2..da8c7b46c 100644
--- a/yuthon_property/views/property_bank_statements_views.xml
+++ b/yuthon_property/views/property_bank_statements_views.xml
@@ -5,6 +5,7 @@
property.bank.statements
+
@@ -21,14 +22,13 @@
-
+
-
diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py
index bf42e902e..0d7e64a30 100644
--- a/yuthon_property_approval/models/inherit_yuthon_property.py
+++ b/yuthon_property_approval/models/inherit_yuthon_property.py
@@ -38,6 +38,12 @@ class PropertyBankStatements(models.Model):
for record in receivable_ids:
record.bank_state = 'reconciled'
+ def button_state(self):
+ receivable_ids = self.env["property.bank.statements"].browse(
+ self._context.get('active_ids', self._context.get('active_id')))
+ for record in receivable_ids:
+ record.bank_state = 'not_reconciled'
+
def contract_penalty(self):
statements_ids = self.env['property.bank.statements'].search([('is_put', '=', True)])
for record in statements_ids:
diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
index 790fb7211..799ff7459 100644
--- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml
+++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml
@@ -590,9 +590,9 @@
-
+
-
+
@@ -604,6 +604,13 @@
code
action = model.button_bank_state()
+
+ 恢复
+
+
+ code
+ action = model.button_state()
+
property.penalty.list.tree
diff --git a/yuthon_property_approval/wizard/click_reconciliation_wizard.py b/yuthon_property_approval/wizard/click_reconciliation_wizard.py
index 7a9549338..3368fe67e 100644
--- a/yuthon_property_approval/wizard/click_reconciliation_wizard.py
+++ b/yuthon_property_approval/wizard/click_reconciliation_wizard.py
@@ -43,9 +43,8 @@ class ClickReconciliationWizard(models.Model):
])
if bank_lines:
- record.bank_state = 'reconciled'
- record.yes_amount = amount_been_reconciled
- record.no_amount = amount_reconciled
+ record.yes_amount = amount_reconciled
+ record.no_amount = amount_been_reconciled
first_line = bank_lines[0]
# 直接使用all_vals中的数据更新应收账款