From e817fc28d8238cec83cafcbcdd98e720bcd94613 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: Wed, 19 Nov 2025 18:15:55 +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_renewal.py | 8 +++----- yuthon_property_approval/views/property_lease_renewal.xml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/yuthon_property_approval/models/property_lease_renewal.py b/yuthon_property_approval/models/property_lease_renewal.py index 4f9ef1f4f..436905490 100644 --- a/yuthon_property_approval/models/property_lease_renewal.py +++ b/yuthon_property_approval/models/property_lease_renewal.py @@ -58,7 +58,7 @@ class PropertyLeaseRenewal(models.Model): deposit = fields.Float(string="押金") receivables_ids = fields.One2many('early.receivables.line', 'renewal_id', string='应收明细') - workflow_record_id = fields.Many2one('soong.workflow.record', string='应付账单流程') + bills_record_id = fields.Many2one('property.bills.payable', string='应付账单流程') @api.depends('receivables_ids.original_amount') def _compute_full_refund(self): @@ -113,7 +113,7 @@ class PropertyLeaseRenewal(models.Model): bills_line_list.append((0, 0, { 'due_date': fields.Date.today(), 'management_type_id': refund_line.management_type_id.id, - 'original_amount': refund_line.refund_amount, + 'original_amount': refund_line.line_amount, })) bills_payable = self.env['property.bills.payable'].create({ 'lease_contract_id': rec.contract_id.id, @@ -121,9 +121,7 @@ class PropertyLeaseRenewal(models.Model): 'create_uid': self.env.uid, 'bills_line_ids': bills_line_list }) - soong_record = self.env["soong.workflow.record"].search([("code", "=", bills_payable.code)]) - if soong_record: - self.workflow_record_id = soong_record.id + self.bills_record_id = bills_payable.id # 原有作废/减免逻辑保留 for receivable_id in rec.receivables_ids: diff --git a/yuthon_property_approval/views/property_lease_renewal.xml b/yuthon_property_approval/views/property_lease_renewal.xml index 0e992803d..3ccfedfbb 100644 --- a/yuthon_property_approval/views/property_lease_renewal.xml +++ b/yuthon_property_approval/views/property_lease_renewal.xml @@ -91,7 +91,7 @@ - +