From 063cb11f366f3346ec3e5b594694e1c0c54a2137 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: Tue, 14 Apr 2026 17:20:26 +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_bills_list.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yuthon_property_approval/models/property_bills_list.py b/yuthon_property_approval/models/property_bills_list.py index 15c87a2bf..6ec98bd4b 100644 --- a/yuthon_property_approval/models/property_bills_list.py +++ b/yuthon_property_approval/models/property_bills_list.py @@ -21,7 +21,9 @@ class PropertyBillsList(models.Model): remake = fields.Text(string="备注") def update_lessor_id(self): - for record in self: + bills_ids = self.env["property.bills.list"].browse( + self._context.get('active_ids', self._context.get('active_id'))) + for record in bills_ids: if record.contract_id: record.lessor_id = record.contract_id.lessor_id.id