Skip to content
Extraits de code Groupes Projets
Valider fc9b927a rédigé par migodoo's avatar migodoo
Parcourir les fichiers

[fix] add return [] in compute search

parent 750238e8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -133,6 +133,8 @@ class ScopCotisationsIDF(models.Model): ...@@ -133,6 +133,8 @@ class ScopCotisationsIDF(models.Model):
recs = self.search([]).filtered(lambda x: x.state not in value) recs = self.search([]).filtered(lambda x: x.state not in value)
if recs: if recs:
return [("id", "in", [x.id for x in recs])] return [("id", "in", [x.id for x in recs])]
else:
return []
@api.depends("type", "invoice_id", "payments_ids", "payments_ids.type") @api.depends("type", "invoice_id", "payments_ids", "payments_ids.type")
def _compute_exoneration(self): def _compute_exoneration(self):
......
...@@ -129,6 +129,8 @@ class ScopInvoiceIDF(models.Model): ...@@ -129,6 +129,8 @@ class ScopInvoiceIDF(models.Model):
recs = self.search([]).filtered(lambda x: x.state not in value) recs = self.search([]).filtered(lambda x: x.state not in value)
if recs: if recs:
return [("id", "in", [x.id for x in recs])] return [("id", "in", [x.id for x in recs])]
else:
return []
# ------------------------------------------------------ # ------------------------------------------------------
# Actions # Actions
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter