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

[fix] add return [] in compute search

parent 28e35c40
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -123,6 +123,8 @@ class ScopCotisationsIDF(models.Model): ...@@ -123,6 +123,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.multi @api.multi
@api.depends('type', 'invoice_id', @api.depends('type', 'invoice_id',
......
...@@ -119,6 +119,8 @@ class ScopInvoiceIDF(models.Model): ...@@ -119,6 +119,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