From 4dc6cc8698b8f238a5d8c039433b29028e3d54ff Mon Sep 17 00:00:00 2001 From: "mra (Open ERP)" Date: Wed, 11 Nov 2009 12:24:00 +0530 Subject: [PATCH] [FIX] membership: solve problem of deleting membership invoice created with old membership product bzr revid: mra@tinyerp.com-20091111065400-3dodf4zrsyw45wc3 --- 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 a0d45169278..4b10f03ccab 100644 --- a/addons/membership/membership.py +++ b/addons/membership/membership.py @@ -267,7 +267,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.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