[FIX] membership: solve problem of deleting membership invoice created with old membership product

bzr revid: mra@tinyerp.com-20091111065400-3dodf4zrsyw45wc3
This commit is contained in:
mra (Open ERP)
2009-11-11 12:24:00 +05:30
parent fbcd9132f2
commit 4dc6cc8698
+1 -1
View File
@@ -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