[FIX]fleet : generation of contract cost should take into account current day too

bzr revid: csn@openerp.com-20121130095449-cypcvs98q76vlurp
This commit is contained in:
Cedric Snauwaert 2012-11-30 10:54:49 +01:00
parent 94dca54e38
commit e1ff74df35
1 changed files with 1 additions and 1 deletions

View File

@ -625,7 +625,7 @@ class fleet_vehicle_log_contract(osv.Model):
startdate = datetime.datetime.strptime(last_cost_date, tools.DEFAULT_SERVER_DATE_FORMAT).date()
if found:
startdate += deltas.get(contract.cost_frequency)
while (startdate < d) & (startdate < datetime.datetime.strptime(contract.expiration_date, tools.DEFAULT_SERVER_DATE_FORMAT).date()):
while (startdate <= d) & (startdate <= datetime.datetime.strptime(contract.expiration_date, tools.DEFAULT_SERVER_DATE_FORMAT).date()):
data = {
'amount': contract.cost_generated,
'date': startdate.strftime(tools.DEFAULT_SERVER_DATE_FORMAT),