diff --git a/yuthon_property_approval/models/inherit_yuthon_property.py b/yuthon_property_approval/models/inherit_yuthon_property.py index f3f11f587..4c2138dfa 100644 --- a/yuthon_property_approval/models/inherit_yuthon_property.py +++ b/yuthon_property_approval/models/inherit_yuthon_property.py @@ -680,7 +680,10 @@ class PropertyAccountsReceivable(models.Model): charging_range = fields.Text(string="收费区间") def action_fix(self): - for record in self: + record_ids = self.env["property.accounts.receivable"].browse( + self._context.get("active_ids", self._context.get("active_id")) + ) + for record in record_ids: if record.management_type_id.name == '违约金': if record.due_date: rent_id = self.env['property.accounts.receivable'].search([