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

Issue 381061002: stock_lot: Add lots traceability (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 months ago by pokoli
Modified:
2 months ago
Reviewers:
reviewbot, ced, albert
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Add tests and some fixes #

Total comments: 1

Patch Set 3 : Group by lots #

Patch Set 4 : Update to tip #

Total comments: 12

Patch Set 5 : Fix remarks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+338 lines, -3 lines) Patch
M CHANGELOG View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M __init__.py View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M setup.py View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M stock.py View 1 2 3 4 2 chunks +88 lines, -2 lines 0 comments Download
M stock.xml View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download
A tests/scenario_stock_lot_production.rst View 1 2 3 4 1 chunk +158 lines, -0 lines 0 comments Download
M tests/test_stock_lot.py View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M tryton.cfg View 1 chunk +2 lines, -0 lines 0 comments Download
A view/lots_link_down_tree.xml View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
A view/lots_link_up_tree.xml View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 14
pokoli
8 months ago (2021-09-24 13:40:57 UTC) #1
reviewbot
flake8 OK URL: https://codereview.tryton.org/381061002
8 months ago (2021-09-24 13:53:16 UTC) #2
pokoli
Add tests and some fixes
8 months ago (2021-09-29 09:57:53 UTC) #3
reviewbot
flake8 OK URL: https://codereview.tryton.org/381061002
8 months ago (2021-09-29 10:03:59 UTC) #4
albert
https://codereview.tryton.org/381061002/diff/350701002/stock.py File stock.py (right): https://codereview.tryton.org/381061002/diff/350701002/stock.py#newcode763 stock.py:763: source.id, target.id, source.production_input)) I think it should be grouped ...
7 months, 1 week ago (2021-10-19 10:45:06 UTC) #5
pokoli
Group by lots
7 months, 1 week ago (2021-10-20 15:58:33 UTC) #6
reviewbot
flake8 OK URL: https://codereview.tryton.org/381061002
7 months, 1 week ago (2021-10-20 15:59:43 UTC) #7
pokoli
Update to tip
6 months, 3 weeks ago (2021-11-02 09:44:49 UTC) #8
reviewbot
flake8 OK URL: https://codereview.tryton.org/381061002
6 months, 3 weeks ago (2021-11-02 09:49:24 UTC) #9
ced
https://codereview.tryton.org/381061002/diff/355711002/stock.py File stock.py (right): https://codereview.tryton.org/381061002/diff/355711002/stock.py#newcode663 stock.py:663: target = fields.Many2One('stock.lot', "Target") I'm wondering if it is ...
6 months ago (2021-11-21 22:12:10 UTC) #10
pokoli
Fix remarks
5 months, 1 week ago (2021-12-14 16:50:00 UTC) #11
pokoli
https://codereview.tryton.org/381061002/diff/355711002/stock.py File stock.py (right): https://codereview.tryton.org/381061002/diff/355711002/stock.py#newcode663 stock.py:663: target = fields.Many2One('stock.lot', "Target") On 2021/11/21 22:12:10, ced wrote: ...
5 months, 1 week ago (2021-12-14 16:50:05 UTC) #12
reviewbot
checks OK URL: https://codereview.tryton.org/381061002
5 months, 1 week ago (2021-12-14 17:00:42 UTC) #13
ced
5 months, 1 week ago (2021-12-14 17:08:37 UTC) #14
https://codereview.tryton.org/381061002/diff/355711002/stock.py
File stock.py (right):

https://codereview.tryton.org/381061002/diff/355711002/stock.py#newcode688
stock.py:688: 'get_related_lots')
On 2021/12/14 16:50:05, pokoli wrote:
> On 2021/11/21 22:12:10, ced wrote:
> > Why using function fields instead of Many2Many field?
> 
> Because there is no link between stock.lot.link records. The unique link is
the
> source and the target field and this forces the usage of the table query.

I guess it is possible to create a Model with a table_query which can be used as
Many2Many relation table.

https://codereview.tryton.org/381061002/diff/355711002/stock.py#newcode701
stock.py:701: return [x.id for x in self.search([
On 2021/12/14 16:50:05, pokoli wrote:
> On 2021/11/21 22:12:10, ced wrote:
> > It is not good for performance to make search query in instance getter.
> 
> How can do it better? Using an sql query is not possible because there is no
> real table. 

You could define a table_query.
Sign in to reply to this message.

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