Skip to content

Commit

Permalink
[FIX] maintenance_plan: The search must work with newIds
Browse files Browse the repository at this point in the history
  • Loading branch information
etobella committed Oct 24, 2023
1 parent 1ea7ab7 commit c410183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maintenance_plan/models/maintenance_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class MaintenancePlan(models.Model):

@api.model
def _search_search_equipment(self, operator, value):
if operator != "=" or not value:
if operator != "=" or (not value and not isinstance(value, models.NewId)):
raise ValueError(_("Unsupported search operator"))
plans = self.search([("generate_with_domain", "=", True)])
plan_ids = []
Expand Down

0 comments on commit c410183

Please sign in to comment.