[date2date] date_to is 364 over date_from when membership product is date2date
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Sat, 26 Jan 2013 14:27:57 +0000 (15:27 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Sat, 26 Jan 2013 14:27:57 +0000 (15:27 +0100)
remembership.py

index 25aa5fb..f1efb31 100644 (file)
@@ -315,7 +315,7 @@ class account_invoice_line(osv.osv):
                       and context['date_from']
                       and datetime.strptime(context['date_from'], "%Y-%m-%d")
                       or date.today())
-                    date_to   = date_from + relativedelta(months = +12) # TODO: parameterize this delta?
+                    date_to   = date_from + relativedelta(days = +364) # TODO: parameterize this delta?
                     date_from = date_from.strftime("%Y-%m-%d")
                     date_to   = date_to  .strftime("%Y-%m-%d")
                 print ("DEV: [create] date_from: %s" % str(date_from))