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