cost_amount is calculated wrongly when using history data
Products By Location.
Lets say we have following cost_price history:
date | cost_price | qty
2014-01-01 1.00 1
2014-01-12 2.00 12
2014-01-14 4.00 14
And datetime.today() is 2014-01-15
Products By Location, for date 2014-01-13
qty: 12
cost_amount: 2*12 = 24
Products By Location, for date 2014-01-12
qty: 12
cost_amount = 1*12 = 12
Expected is cost_amount = 24
I believe problem lies in
http://hg.tryton.org/trytond/trytond/modules/stock/file/056cbb515d4d/product.py#l111
It uses <= datetime.date
But should be <= datetime.date + 23:59:59