From: Ludovic CHEVALIER Date: Sat, 26 Jan 2013 14:27:57 +0000 (+0100) Subject: [date2date] date_to is 364 over date_from when membership product is date2date X-Git-Url: http://git.cyclocoop.org/data/%27%20.%20mediabox_timestamp%28find_in_path%28%27javascript/%7B%24www_url%7Dadmin/compta/operations/%40%20%27info_etape_suivante_2%27%20=%3E%20%27You%20can%20move%20on%20to%20the%20next%20step.%27%2C%20%27info_exceptions_proxy%27%20=%3E%20%27Exceptions%20for%20the%20proxy%27%2C%20%27info_exportation_base%27%20=%3E%20%27export%20database%20to%20%40archive%40%27%2C-%27info_facilite_suivi_activite%27%20=%3E%20%27To%20simplify%20monitoring%20of%20the%20site/%27s%20editorial;-%20%20activities%2C%20SPIP%20can%20send%20rmail%20notifications%2C%20e.g.%20to%20an%20editors/%27puce.gif/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=2e4170e3bec41df8553a66b9061a40dbc4ae0e8d;p=burette%2Fremembership.git [date2date] date_to is 364 over date_from when membership product is date2date --- diff --git a/remembership.py b/remembership.py index 25aa5fb..f1efb31 100644 --- a/remembership.py +++ b/remembership.py @@ -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))