From 7c50212ce303cb7611c7f2cfd6ccb7e3b8e9dd68 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 15:51:41 +0800
Subject: [PATCH 1/2] =?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_property/models/property_accounts_receivable.py | 7 +++++++
.../views/property_accounts_receivable_views.xml | 7 +++++++
.../wizard/property_reconciliation_wizard.py | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/yuthon_property/models/property_accounts_receivable.py b/yuthon_property/models/property_accounts_receivable.py
index b4a95d796..1699b886e 100644
--- a/yuthon_property/models/property_accounts_receivable.py
+++ b/yuthon_property/models/property_accounts_receivable.py
@@ -43,6 +43,13 @@ class PropertyAccountsReceivable(models.Model):
bank_id = fields.Many2one('property.bank.statements', string='流水记录')
receivable_log = fields.Text(string='应收日志')
+ def update_is_reconciliation(self):
+ record_ids = self.env["property.accounts.receivable"].browse(
+ self._context.get("active_ids", self._context.get("active_id"))
+ )
+ for record in record_ids:
+ record.is_reconciliation = True
+
@api.depends('original_amount', 'delivered1')
def compute_submitted(self):
for record in self:
diff --git a/yuthon_property/views/property_accounts_receivable_views.xml b/yuthon_property/views/property_accounts_receivable_views.xml
index b7d0b5bc3..6fd53398b 100644
--- a/yuthon_property/views/property_accounts_receivable_views.xml
+++ b/yuthon_property/views/property_accounts_receivable_views.xml
@@ -39,6 +39,13 @@
code
action = model.initialize_wizard()
+
+ 更新已对账
+
+
+ code
+ action = model.update_is_reconciliation()
+
发票基本信息模板下载
self
diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py
index 1ddfacb5a..86c780d29 100644
--- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py
+++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py
@@ -30,7 +30,7 @@ class PropertyReconciliationWizard(models.Model):
for rec in self:
rec.amount_reconciled = rec.actual_total - rec.amount_been_reconciled - sum(line.amount for line in rec.reconciliation_line_ids)
for line in rec.reconciliation_line_ids:
- if line.rent_month == line.amount and line.collection_type == 'rent' and line.due_date.year != rec.actual_date.year or line.due_date.month != rec.actual_date.month:
+ if line.rent_month == line.amount and line.collection_type == 'rent' and (line.due_date.year != rec.actual_date.year or line.due_date.month != rec.actual_date.month):
line.remake = str(rec.actual_date) + '补' + str(line.due_date)
@api.depends('reconciliation_line_ids')
From b3241772bd6954581446396f37e7ef5b7ec50cbd 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 15:52:39 +0800
Subject: [PATCH 2/2] =?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
---
.../wizard/property_reconciliation_wizard.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py
index 86c780d29..c23e8e0e0 100644
--- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py
+++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py
@@ -30,8 +30,9 @@ class PropertyReconciliationWizard(models.Model):
for rec in self:
rec.amount_reconciled = rec.actual_total - rec.amount_been_reconciled - sum(line.amount for line in rec.reconciliation_line_ids)
for line in rec.reconciliation_line_ids:
- if line.rent_month == line.amount and line.collection_type == 'rent' and (line.due_date.year != rec.actual_date.year or line.due_date.month != rec.actual_date.month):
- line.remake = str(rec.actual_date) + '补' + str(line.due_date)
+ if line.amount:
+ if line.rent_month == line.amount and line.collection_type == 'rent' and (line.due_date.year != rec.actual_date.year or line.due_date.month != rec.actual_date.month):
+ line.remake = str(rec.actual_date) + '补' + str(line.due_date)
@api.depends('reconciliation_line_ids')
def _compute_receivable_total(self):