From f6d2a75c94e9f3b6d64efefb1d5b7f599a10d576 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 4 Jan 2016 16:26:34 +0100 Subject: [PATCH] [FIX] membership: Comparing apples and oranges Comparing apples and oranges: account.invoice.line() == 'paid' --- addons/membership/membership.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/membership/membership.py b/addons/membership/membership.py index 0a4dd491847..895d6ca7261 100644 --- a/addons/membership/membership.py +++ b/addons/membership/membership.py @@ -249,7 +249,7 @@ class Partner(osv.osv): s = 3 if s==4: for mline in partner_data.member_lines: - if mline.date_from < today and mline.date_to < today and mline.date_from <= mline.date_to and (mline.account_invoice_line and mline.account_invoice_line.invoice_id.state) == 'paid': + if mline.date_from < today and mline.date_to < today and mline.date_from <= mline.date_to and mline.account_invoice_line and mline.account_invoice_line.invoice_id.state == 'paid': s = 5 else: s = 6