From 59c092a270fccde3626ccabb4f1a1d0e189cc0b6 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: Fri, 17 Oct 2025 17:11:16 +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 --- yuthon_property_approval/wizard/property_rental_wizard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yuthon_property_approval/wizard/property_rental_wizard.py b/yuthon_property_approval/wizard/property_rental_wizard.py index d4dbbf10a..d903abe97 100644 --- a/yuthon_property_approval/wizard/property_rental_wizard.py +++ b/yuthon_property_approval/wizard/property_rental_wizard.py @@ -41,8 +41,9 @@ class PropertyRentalWizard(models.Model): receivable = self.env['property.accounts.receivable'].search([ ('contract_id', '=', record.id), + ('management_type_id.name', '=', '租金'), ]) - if receivable: + if not receivable: acc_type = 'new' else: acc_type = None