diff --git a/models/scop_cotisation_idf.py b/models/scop_cotisation_idf.py index 89d7f3054eeefa84cf45b7b2f76590fa4efae8ad..552d3ce17c03c83fbc8a30c7c26cc2526163cca2 100644 --- a/models/scop_cotisation_idf.py +++ b/models/scop_cotisation_idf.py @@ -123,6 +123,8 @@ class ScopCotisationsIDF(models.Model): recs = self.search([]).filtered(lambda x: x.state not in value) if recs: return [('id', 'in', [x.id for x in recs])] + else: + return [] @api.multi @api.depends('type', 'invoice_id', diff --git a/models/scop_invoice_idf.py b/models/scop_invoice_idf.py index 588b811b861c9390ec94daceb0eb636203f0c8b7..def0be58f9c3348a1465af7af08c99213b3cf022 100644 --- a/models/scop_invoice_idf.py +++ b/models/scop_invoice_idf.py @@ -119,6 +119,8 @@ class ScopInvoiceIDF(models.Model): recs = self.search([]).filtered(lambda x: x.state not in value) if recs: return [('id', 'in', [x.id for x in recs])] + else: + return [] # ------------------------------------------------------ # Actions