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))
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))