From b78bc401f8f642244c965599dec012af1a789b60 Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Wed, 16 Jul 2025 15:46:39 +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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 150963615..200922486 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -170,8 +170,8 @@ class PropertyLeaseContract(models.Model): lease_ids = fields.One2many('property.lease.contract.line', 'lease_id',string="物业信息明细行") subset_ids = fields.One2many('property.subset.contract', 'subset_id',string="子集明细") breakdown_ids = fields.One2many('property.rent.breakdown.line', 'breakdown_id', string="物业租金明细行") - water_fee_ids = fields.One2many('property.water.fee.line', 'contract_id', string="物业水费明细行", store=True) - electricity_fee_ids = fields.One2many('property.electric.fee.line', 'contract_id', string="物业电费明细行", store=True) + water_fee_ids = fields.One2many('property.water.fee.line', 'contract_id', string="物业水费明细行", compute='_compute_lease_ids') + electricity_fee_ids = fields.One2many('property.electric.fee.line', 'contract_id', string="物业电费明细行", compute='_compute_lease_ids') mange_fee_ids = fields.One2many('property.manage.fee.line', 'contract_id', string="物业管理费明细行") other_ids = fields.One2many('property.other.fee.line', 'other_id', string="其他费用明细行") rent_list_ids = fields.One2many('property.rent.list', 'contract_id', string="租金明细行") @@ -242,7 +242,6 @@ class PropertyLeaseContract(models.Model): def _compute_lease_ids(self): for rec in self: # 初始化值 - rec.admin_id = False rec.is_water = False rec.is_electricity = False rec.water_fee_ids = [(5, 0, 0)]