From 393f1d077648aaaae11dfd14ed4e73d201534463 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, 4 Dec 2025 19:29:44 +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 --- .../models/inherit_yuthon_property.py | 1 + .../models/property_bills_list.py | 1 + .../views/inherit_yuthon_property_views.xml | 4 ++-- .../views/property_bills_list_views.xml | 3 ++- .../wizard/property_bills_wizard.py | 16 +++++++++------- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index 450bbd85b..3ce4a4d73 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -222,6 +222,7 @@ class PropertyBankStatements(models.Model): ) contract_ids = tenant_lines.mapped('lease_contract_id.id') contracts = self.env['property.lease.contract'].browse(contract_ids) + contracts = contracts.filtered(lambda c: c.contact_state != 'settle') contract_set |= contracts record.contract_ids = contract_set record.admin_id = record.contract_ids[0].admin_id if record.contract_ids else False diff --git a/yuthon_property_approval/models/property_bills_list.py b/yuthon_property_approval/models/property_bills_list.py index 598347026..dea63f2d9 100644 --- a/yuthon_property_approval/models/property_bills_list.py +++ b/yuthon_property_approval/models/property_bills_list.py @@ -13,6 +13,7 @@ class PropertyBillsList(models.Model): contract_id = fields.Many2one('property.lease.contract', string="合同编号") lessee_id = fields.Many2one(related="contract_id.lessee_id", string="承租方", store=True) property_name = fields.Char(related='contract_id.property_name', string="物业信息") + is_written = fields.Boolean(string="已核销", default=False) def action_pay(self): return { diff --git a/yuthon_property_approval/views/inherit_yuthon_property_views.xml b/yuthon_property_approval/views/inherit_yuthon_property_views.xml index 696f2a772..48c802a89 100644 --- a/yuthon_property_approval/views/inherit_yuthon_property_views.xml +++ b/yuthon_property_approval/views/inherit_yuthon_property_views.xml @@ -682,11 +682,11 @@ action = model.batch_revocation() - 一次性时差更新 + 同步合同编号 code - action = model.test_one() + action = model.update_property_employee_id() 关联绑定承租方和合同 diff --git a/yuthon_property_approval/views/property_bills_list_views.xml b/yuthon_property_approval/views/property_bills_list_views.xml index 070f04e1e..ad58d3419 100644 --- a/yuthon_property_approval/views/property_bills_list_views.xml +++ b/yuthon_property_approval/views/property_bills_list_views.xml @@ -13,7 +13,8 @@ -