diff options
| author | Raphael Collet <rco@odoo.com> | 2018-05-14 16:58:21 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2018-05-16 16:25:03 +0200 |
| commit | bcf20cfbecf6850256ad2d542bc3cac75a42dad8 (patch) | |
| tree | 4b132747c7b7f6a0df319290ae7876d84c5a2ab2 /setup | |
| parent | 82b15e06ceb19c0fd15d04194eebdb3c1710763e (diff) | |
[FIX] stock: use timedelta instead of relativedelta
Suppose we have a delta between two datetimes:
delta = dt1 - dt0
If delta is negative but less than a day, ``delta.days`` returns -1 (which is
compensated by positive seconds). In order to avoid this surprising effect,
use ``delta.total_seconds()`` to compute the number of days.
Diffstat (limited to 'setup')
0 files changed, 0 insertions, 0 deletions
