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

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 months, 3 weeks ago by angel
Modified:
1 month, 1 week 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: 3
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 3 comments Download

Messages

Total messages: 5
angel
2 months, 3 weeks ago (2018-11-26 12:38:32 UTC) #1
reviewbot
flake8 OK URL: https://codereview.tryton.org/45841002
2 months, 3 weeks 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 ...
2 months, 3 weeks ago (2018-11-26 15:47:53 UTC) #3
ced
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, ...
2 months, 2 weeks ago (2018-11-28 23:45:49 UTC) #4
ced
1 month, 1 week ago (2019-01-04 00:27:09 UTC) #5
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/28 23:45:49, ced wrote:
> 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.

I implemented it in https://codereview.tryton.org/50681002
Sign in to reply to this message.

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