X-Git-Url: http://git.cyclocoop.org/?p=burette%2Fremembership.git;a=blobdiff_plain;f=remembership.py;fp=remembership.py;h=ad6438fc0725f47c93e231c4c7d44e36e99d9d5d;hp=fcd89fe186a0b69de6ee2e3fd79e26fe05faad87;hb=802382f31bb96c7396e3e3c7e57feb582ed3dfa0;hpb=916f69035027c822cd44e2d570decda4c3372357 diff --git a/remembership.py b/remembership.py index fcd89fe..ad6438f 100644 --- a/remembership.py +++ b/remembership.py @@ -253,7 +253,7 @@ class account_invoice_line(osv.osv): and context.get('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(months=+12, days=-1) # TODO: parameterize this delta? date_from = date_from.strftime("%Y-%m-%d") date_to = date_to .strftime("%Y-%m-%d") print ("DEV: [remembership] [account_invoice_line] [write] date_from: %s" % str(date_from)) @@ -325,7 +325,8 @@ class account_invoice_line(osv.osv): and context.get('date_from') and datetime.strptime(context.get('date_from'), "%Y-%m-%d") or date.today()) - date_to = date_from + relativedelta(days = +364) # TODO: parameterize this delta? + print("#DEBUG: Date de début - %s" % str(date_from)) + date_to = date_from + relativedelta(months=+12, days=-1) # TODO: parameterize this delta? date_from = date_from.strftime("%Y-%m-%d") date_to = date_to .strftime("%Y-%m-%d") print ("DEV: [remembership] [account_invoice_line] [create] date_from: %s" % str(date_from))