From 167df2e474870aa17203917a382d09d25c263870 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 9 Jan 2025 15:28:58 +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/models/property_lease_contract.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 48fc8497d..e3a6a816e 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -150,7 +150,7 @@ class PropertyLeaseContract(models.Model): def _onchange_unit_price(self): for i in self: if i.total_area and i.rent: - i.unit_price = i.total_area / i.rent + i.unit_price = i.rent / i.total_area @api.depends('breakdown_ids') def _compute_total_contract_receivables(self): @@ -369,7 +369,6 @@ class PropertyLeaseContract(models.Model): all_period_rent = record.do_generate_details_core(False, start_date, first_year_end_date) record.first_year_rent = all_period_rent - def do_generate_details_core(self, write_db=False, start_date=None, end_date=None): all_period_rent = 0