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

Issue 353701002: tryton-env: Add warehouses selection to supply stock wizard (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 7 months ago by Davidoff
Modified:
10 months ago
Reviewers:
pokoli, rietveld-bot, ced, reviewbot
Visibility:
Public.

Description

COLLABORATOR=sergi@koolpi.com issue10532

Patch Set 1 #

Patch Set 2 : stock_supply: Add warehouses selection to supply stock wizard #

Total comments: 4

Patch Set 3 : Set the warehouses into the purchase_parameters, break line and remove warehouses label #

Patch Set 4 : Add whitespace after : #

Total comments: 2

Patch Set 5 : Set warehouses on StockSupply.execute #

Total comments: 2

Patch Set 6 : stock_supply: Make supply stock wizard able to work without values and add colspan for warehouses f… #

Total comments: 2

Patch Set 7 : Test if the StartView has a warehouse value and not pass data where not needed #

Patch Set 8 : Test if the start StateView has a warehouse value and not pass data where not needed #

Total comments: 6

Patch Set 9 : Not set warehouses required to False and comment why getattr() is used #

Total comments: 1

Patch Set 10 : Also update stock_supply_production #

Total comments: 1

Patch Set 11 : Remove breakpoint #

Total comments: 3

Patch Set 12 : Start is empty on cron -> start is empty when run by cron and add help message in warehouses field #

Total comments: 1

Patch Set 13 : Put help as last keyword in warehouses field #

Total comments: 1

Patch Set 14 : Filter order point by warehouses #

Patch Set 15 : Filter order point by warehouses #

Total comments: 6

Patch Set 16 : Append new parameters in case someone was using positional, use a set instead of a list, filter onl… #

Total comments: 2

Patch Set 17 : Use warehouse instances instead of ids and create a new list of order_points #

Total comments: 3

Patch Set 18 : Fill used_order_points list properly and call generate_internal_shipment just once #

Total comments: 3

Patch Set 19 : Remove useless declaration, break line at opening [ and overwrite order_points #

Patch Set 20 : Update to tip #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -5 lines) Patch
M modules/stock_supply/CHANGELOG View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M modules/stock_supply/shipment.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +8 lines, -1 line 0 comments Download
M modules/stock_supply/stock.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +28 lines, -3 lines 0 comments Download
M modules/stock_supply/view/supply_start_form.xml View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M modules/stock_supply_production/stock.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 59
Davidoff
1 year, 7 months ago (2021-06-28 09:38:27 UTC) #1
Davidoff
stock_supply: Add warehouses selection to supply stock wizard
1 year, 7 months ago (2021-06-28 09:41:00 UTC) #2
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 7 months ago (2021-06-28 09:53:16 UTC) #3
pokoli
https://codereview.tryton.org/353701002/diff/342601004/stock.py File stock.py (left): https://codereview.tryton.org/353701002/diff/342601004/stock.py#oldcode106 stock.py:106: PurchaseRequest.generate_requests(**self._purchase_parameters) Why not setting the warehouses into the purchase_parameters?
1 year, 7 months ago (2021-06-28 10:30:47 UTC) #4
ced
https://codereview.tryton.org/353701002/diff/342601004/stock.py File stock.py (left): https://codereview.tryton.org/353701002/diff/342601004/stock.py#oldcode106 stock.py:106: PurchaseRequest.generate_requests(**self._purchase_parameters) On 2021/06/28 10:30:47, pokoli wrote: > Why not ...
1 year, 7 months ago (2021-06-28 22:25:25 UTC) #5
Davidoff
Set the warehouses into the purchase_parameters, break line and remove warehouses label
1 year, 7 months ago (2021-06-29 08:59:37 UTC) #6
Davidoff
Add whitespace after :
1 year, 7 months ago (2021-06-29 09:00:44 UTC) #7
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 7 months ago (2021-06-29 09:22:14 UTC) #8
pokoli
https://codereview.tryton.org/353701002/diff/358341002/stock.py File stock.py (right): https://codereview.tryton.org/353701002/diff/358341002/stock.py#newcode118 stock.py:118: 'stock.location', None, None, 'Warehouses', required=True, Warehouses should be in ...
1 year, 7 months ago (2021-06-29 10:02:43 UTC) #9
Davidoff
Set warehouses on StockSupply.execute
1 year, 7 months ago (2021-06-29 10:17:08 UTC) #10
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 7 months ago (2021-06-29 10:24:12 UTC) #11
ced
https://codereview.tryton.org/353701002/diff/362101002/order_point.py File order_point.py (right): https://codereview.tryton.org/353701002/diff/362101002/order_point.py#newcode263 order_point.py:263: StockSupply.execute(session_id, data, 'create_') I think it will be better ...
1 year, 5 months ago (2021-08-08 22:52:20 UTC) #12
Davidoff
stock_supply: Make supply stock wizard able to work without values and add colspan for warehouses ...
1 year, 4 months ago (2021-09-06 12:36:35 UTC) #13
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 4 months ago (2021-09-06 12:56:37 UTC) #14
pokoli
stock_supply_production should be also updated. https://codereview.tryton.org/353701002/diff/338831016/order_point.py File order_point.py (right): https://codereview.tryton.org/353701002/diff/338831016/order_point.py#newcode262 order_point.py:262: data = {'start': {'warehouses': ...
1 year, 4 months ago (2021-09-15 13:41:13 UTC) #15
Davidoff
Test if the StartView has a warehouse value and not pass data where not needed
1 year, 4 months ago (2021-09-15 14:24:01 UTC) #16
Davidoff
Test if the start StateView has a warehouse value and not pass data where not ...
1 year, 4 months ago (2021-09-15 14:25:46 UTC) #17
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 4 months ago (2021-09-15 14:28:19 UTC) #18
ced
I agree that stock_supply_production should also be updated to pass warehouses to Production.generate_requests. https://codereview.tryton.org/353701002/diff/334991002/stock.py File ...
1 year, 4 months ago (2021-09-15 22:07:26 UTC) #19
Davidoff
If I do it with "if self.start.warehouses:", I receive AttributeError: 'stock.supply.start' Model has no attribute ...
1 year, 4 months ago (2021-09-16 07:38:07 UTC) #20
ced
https://codereview.tryton.org/353701002/diff/334991002/stock.py File stock.py (right): https://codereview.tryton.org/353701002/diff/334991002/stock.py#newcode102 stock.py:102: if getattr(self.start, 'warehouses', None): On 2021/09/16 07:38:07, Davidoff wrote: ...
1 year, 4 months ago (2021-09-16 07:47:48 UTC) #21
pokoli
https://codereview.tryton.org/353701002/diff/334991002/stock.py File stock.py (right): https://codereview.tryton.org/353701002/diff/334991002/stock.py#newcode102 stock.py:102: if getattr(self.start, 'warehouses', None): On 2021/09/16 07:47:48, ced wrote: ...
1 year, 4 months ago (2021-09-16 08:38:43 UTC) #22
ced
https://codereview.tryton.org/353701002/diff/334991002/stock.py File stock.py (right): https://codereview.tryton.org/353701002/diff/334991002/stock.py#newcode102 stock.py:102: if getattr(self.start, 'warehouses', None): On 2021/09/16 08:38:43, pokoli wrote: ...
1 year, 4 months ago (2021-09-16 08:46:27 UTC) #23
Davidoff
Not set warehouses required to False and comment why getattr() is used
1 year, 4 months ago (2021-09-16 11:41:28 UTC) #24
pokoli
Still missing stock_supply_production https://codereview.tryton.org/353701002/diff/344741002/stock.py File stock.py (right): https://codereview.tryton.org/353701002/diff/344741002/stock.py#newcode102 stock.py:102: # We use getattr() for supporting ...
1 year, 4 months ago (2021-09-16 11:43:48 UTC) #25
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 4 months ago (2021-09-16 11:53:31 UTC) #26
Davidoff
Also update stock_supply_production
1 year, 4 months ago (2021-09-16 12:37:27 UTC) #27
pokoli
https://codereview.tryton.org/353701002/diff/336921006/modules/stock_supply_production/stock.py File modules/stock_supply_production/stock.py (right): https://codereview.tryton.org/353701002/diff/336921006/modules/stock_supply_production/stock.py#newcode101 modules/stock_supply_production/stock.py:101: breakpoint() breakpoint should be removed
1 year, 4 months ago (2021-09-16 12:43:18 UTC) #28
Davidoff
Remove breakpoint
1 year, 4 months ago (2021-09-16 12:45:45 UTC) #29
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 4 months ago (2021-09-16 12:55:57 UTC) #30
pokoli
LGTM
1 year, 4 months ago (2021-09-30 14:58:04 UTC) #31
ced
https://codereview.tryton.org/353701002/diff/373591002/modules/stock_supply/stock.py File modules/stock_supply/stock.py (right): https://codereview.tryton.org/353701002/diff/373591002/modules/stock_supply/stock.py#newcode102 modules/stock_supply/stock.py:102: # Use getattr because start is empty on cron ...
1 year, 4 months ago (2021-10-03 08:40:16 UTC) #32
Davidoff
Start is empty on cron -> start is empty when run by cron and add ...
1 year, 4 months ago (2021-10-04 07:42:59 UTC) #33
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 4 months ago (2021-10-04 08:08:13 UTC) #34
ced
https://codereview.tryton.org/353701002/diff/373711002/modules/stock_supply/stock.py File modules/stock_supply/stock.py (right): https://codereview.tryton.org/353701002/diff/373711002/modules/stock_supply/stock.py#newcode123 modules/stock_supply/stock.py:123: help="If empty all warehouses are used.", Guidelines are to ...
1 year, 4 months ago (2021-10-04 22:41:55 UTC) #35
Davidoff
Put help as last keyword in warehouses field
1 year, 4 months ago (2021-10-05 07:22:49 UTC) #36
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 3 months ago (2021-10-05 07:43:30 UTC) #37
ced
https://codereview.tryton.org/353701002/diff/381141002/modules/stock_supply/stock.py File modules/stock_supply/stock.py (right): https://codereview.tryton.org/353701002/diff/381141002/modules/stock_supply/stock.py#newcode94 modules/stock_supply/stock.py:94: return ShipmentInternal.generate_internal_shipment(clean=clean) I think we must also support warehouses ...
1 year, 3 months ago (2021-10-05 22:41:02 UTC) #38
Davidoff
Filter order point by warehouses
1 year, 3 months ago (2021-10-07 09:24:28 UTC) #39
Davidoff
Filter order point by warehouses
1 year, 3 months ago (2021-10-07 09:25:52 UTC) #40
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 3 months ago (2021-10-07 09:33:48 UTC) #41
ced
https://codereview.tryton.org/353701002/diff/355621002/modules/stock_supply/shipment.py File modules/stock_supply/shipment.py (right): https://codereview.tryton.org/353701002/diff/355621002/modules/stock_supply/shipment.py#newcode14 modules/stock_supply/shipment.py:14: def generate_internal_shipment(cls, warehouses=None, clean=True): Better to append new parameters ...
1 year, 3 months ago (2021-10-11 14:05:18 UTC) #42
Davidoff
Append new parameters in case someone was using positional, use a set instead of a ...
1 year, 3 months ago (2021-10-13 08:17:39 UTC) #43
reviewbot
flake8 OK URL: https://codereview.tryton.org/353701002
1 year, 3 months ago (2021-10-13 08:40:25 UTC) #44
ced
https://codereview.tryton.org/353701002/diff/360281002/modules/stock_supply/shipment.py File modules/stock_supply/shipment.py (right): https://codereview.tryton.org/353701002/diff/360281002/modules/stock_supply/shipment.py#newcode55 modules/stock_supply/shipment.py:55: and op.location.warehouse.id not in warehouse_ids] The comment about list ...
1 year, 1 month ago (2021-12-12 23:52:18 UTC) #45
Davidoff
Use warehouse instances instead of ids and create a new list of order_points
1 year, 1 month ago (2021-12-16 08:53:30 UTC) #46
reviewbot
checks OK URL: https://codereview.tryton.org/353701002
1 year, 1 month ago (2021-12-16 09:07:26 UTC) #47
ced
https://codereview.tryton.org/353701002/diff/376231003/modules/stock_supply/shipment.py File modules/stock_supply/shipment.py (right): https://codereview.tryton.org/353701002/diff/376231003/modules/stock_supply/shipment.py#newcode52 modules/stock_supply/shipment.py:52: if warehouses: There is no need to test this ...
1 year ago (2022-01-25 22:39:03 UTC) #48
Davidoff
Fill used_order_points list properly and call generate_internal_shipment just once
11 months, 3 weeks ago (2022-02-14 12:41:25 UTC) #49
reviewbot
checks OK URL: https://codereview.tryton.org/353701002
11 months, 3 weeks ago (2022-02-14 13:05:35 UTC) #50
ced
https://codereview.tryton.org/353701002/diff/360921002/modules/stock_supply/shipment.py File modules/stock_supply/shipment.py (right): https://codereview.tryton.org/353701002/diff/360921002/modules/stock_supply/shipment.py#newcode51 modules/stock_supply/shipment.py:51: used_order_points = [] useless https://codereview.tryton.org/353701002/diff/360921002/modules/stock_supply/shipment.py#newcode52 modules/stock_supply/shipment.py:52: used_order_points = [op ...
10 months, 1 week ago (2022-03-25 15:01:44 UTC) #51
Davidoff
Remove useless declaration, break line at opening [ and overwrite order_points
10 months, 1 week ago (2022-03-29 09:17:17 UTC) #52
reviewbot
checks OK URL: https://codereview.tryton.org/353701002
10 months, 1 week ago (2022-03-29 09:34:08 UTC) #53
Davidoff
Update to tip
10 months ago (2022-04-06 10:54:56 UTC) #54
reviewbot
checks OK URL: https://codereview.tryton.org/353701002
10 months ago (2022-04-06 11:14:08 UTC) #55
ced
LGTM
10 months ago (2022-04-06 21:47:39 UTC) #56
rietveld-bot_tryton.org
New changeset 0fb7b188fb26 by David Blanco Bautista in branch 'default': Add warehouses selection to supply ...
10 months ago (2022-04-06 22:06:43 UTC) #57
rietveld-bot_tryton.org
New changeset 6edaaba16b00 by David Blanco Bautista in branch 'default': Add warehouses selection to supply ...
10 months ago (2022-04-06 22:06:48 UTC) #58
rietveld-bot_tryton.org
10 months ago (2022-04-06 22:06:55 UTC) #59
New changeset 9c3595e62be2 by David Blanco Bautista in branch 'default':
Add warehouses selection to supply stock wizard
https://hg.tryton.org/tryton-env/rev/9c3595e62be2
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld d9ca037-tainted