From: Sébastien Grignard Date: Fri, 10 Jan 2014 22:13:04 +0000 (+0100) Subject: Only use the date if there is no invoice/order for a membership line. X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=58007bf25a6b7b5204df5f03ed69a082cbe66f43;hp=a1cea249dabd802da5994348bc057cc3da20d9df;p=burette%2Fpos_membership.git Only use the date if there is no invoice/order for a membership line. --- diff --git a/pos_membership.py b/pos_membership.py index b53eac3..e61b697 100644 --- a/pos_membership.py +++ b/pos_membership.py @@ -456,6 +456,10 @@ class Partner(osv.osv): s = 2 elif ostate == 'draft' and s != 0 and s != 1: s = 3 + else: + # when we don't have an invoice line only use the date to get the state. + s = 0 + break if s == 4: for mline in partner_data.member_lines: if mline.date_from < today and \