Tryton Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(79)

Issue 45841002: stock_lot_sled:Do not add shelf life delay if stock_date_end equals to date.max

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 weeks, 1 day ago by angel
Modified:
2 weeks, 6 days ago
Reviewers:
pokoli, ced, reviewbot
Visibility:
Public.

Description

Do not add shelf life delay if stock_date_end equals to date.max issue7883

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M stock.py View 1 chunk +1 line, -1 line 2 comments Download

Messages

Total messages: 4
angel
3 weeks, 1 day ago (2018-11-26 12:38:32 UTC) #1
reviewbot
flake8 OK URL: https://codereview.tryton.org/45841002
3 weeks, 1 day ago (2018-11-26 13:10:37 UTC) #2
pokoli
I'm wondering if we should add a test https://codereview.tryton.org/45841002/diff/1/stock.py File stock.py (right): https://codereview.tryton.org/45841002/diff/1/stock.py#newcode253 stock.py:253: if ...
3 weeks, 1 day ago (2018-11-26 15:47:53 UTC) #3
ced
2 weeks, 6 days ago (2018-11-28 23:45:49 UTC) #4
https://codereview.tryton.org/45841002/diff/1/stock.py
File stock.py (right):

https://codereview.tryton.org/45841002/diff/1/stock.py#newcode253
stock.py:253: if shelf_life_delay and stock_date_end < datetime.date.max:
On 2018/11/26 15:47:53, pokoli wrote:
> I think it will be better to catch the overflow error, otherwise it will be
> possible produce the same issue when using a very big shelf_life_delay

Agree and the expiration_date should be max in such case.
There is also the possibility of overflow below datetime.date.min and in this
case the expiration_date should be min.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 0147766