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

Issue 60441002: tryton-env: Fix domain inversion of child_of mixing M2O and Reference fields (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 months, 4 weeks ago by nicoe
Modified:
3 months, 2 weeks ago
Reviewers:
rietveld-bot, ced, reviewbot
Visibility:
Public.

Description

Domain inversion on Reference field does not work when using the dotted notation with a M2O field using child_of or parent_of. To solve this we correctly compute the localization of child_of leaves when using the dotted notation (which renders the inverse_leaf function useless). But we must also ensure that the selection used by reference fields restrict the choice to the right models. issue7869

Patch Set 1 #

Total comments: 18

Patch Set 2 : Add SelectionMixin support for Reference field + fixes #

Total comments: 20

Patch Set 3 : Fix remarks #

Total comments: 15

Patch Set 4 : Fix remarks #

Total comments: 8

Patch Set 5 : fix remarks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -21 lines) Patch
M sao/src/common.js View 1 2 3 4 4 chunks +74 lines, -7 lines 0 comments Download
M sao/src/model.js View 1 2 3 3 chunks +13 lines, -4 lines 0 comments Download
M sao/tests/sao.js View 1 2 3 2 chunks +68 lines, -0 lines 0 comments Download
M tryton/tryton/common/__init__.py View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M tryton/tryton/common/domain_inversion.py View 1 2 3 5 chunks +70 lines, -0 lines 0 comments Download
M tryton/tryton/common/selection.py View 1 2 3 2 chunks +13 lines, -6 lines 0 comments Download
M tryton/tryton/gui/window/view_form/model/field.py View 1 2 3 3 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 26
nicoe
4 months, 4 weeks ago (2018-11-20 17:01:17 UTC) #1
reviewbot
https://codereview.tryton.org/60441002/diff/1/tryton/tryton/common/__init__.py#newcode3 tryton/tryton/common/__init__.py:3: F403 'from common import *' used; unable to detect undefined names https://codereview.tryton.org/60441002/diff/1/tryton/tryton/common/__init__.py#newcode4 tryton/tryton/common/__init__.py:4: ...
4 months, 4 weeks ago (2018-11-20 17:14:35 UTC) #2
ced
I would prefer that the removal of inverse_leaf is done in a separate issue. As ...
4 months, 4 weeks ago (2018-11-20 17:54:32 UTC) #3
nicoe
Add SelectionMixin support for Reference field + fixes
4 months, 3 weeks ago (2018-11-23 10:06:25 UTC) #4
reviewbot
https://codereview.tryton.org/60441002/diff/20001/tryton/tryton/common/__init__.py#newcode3 tryton/tryton/common/__init__.py:3: F403 'from common import *' used; unable to detect undefined names https://codereview.tryton.org/60441002/diff/20001/tryton/tryton/common/__init__.py#newcode4 tryton/tryton/common/__init__.py:4: ...
4 months, 3 weeks ago (2018-11-23 10:13:14 UTC) #5
ced
https://codereview.tryton.org/60441002/diff/20001/tryton/tryton/common/domain_inversion.py File tryton/tryton/common/domain_inversion.py (right): https://codereview.tryton.org/60441002/diff/20001/tryton/tryton/common/domain_inversion.py#newcode170 tryton/tryton/common/domain_inversion.py:170: if domain[0].count('.') and len(domain) > 3: This part of ...
4 months, 3 weeks ago (2018-11-26 22:07:55 UTC) #6
ced
The description could be more verbose about what is happening, why it is changed, what ...
4 months, 3 weeks ago (2018-11-26 22:08:40 UTC) #7
nicoe
https://codereview.tryton.org/60441002/diff/1/sao/CHANGELOG File sao/CHANGELOG (right): https://codereview.tryton.org/60441002/diff/1/sao/CHANGELOG#newcode1 sao/CHANGELOG:1: * Fix domain inversion of child_of mixing M2O and ...
4 months, 3 weeks ago (2018-11-27 16:52:57 UTC) #8
ced
https://codereview.tryton.org/60441002/diff/20001/tryton/tryton/common/selection.py File tryton/tryton/common/selection.py (left): https://codereview.tryton.org/60441002/diff/20001/tryton/tryton/common/selection.py#oldcode62 tryton/tryton/common/selection.py:62: self.filter_selection(domain, record, field) On 2018/11/27 16:52:56, nicoe wrote: > ...
4 months, 3 weeks ago (2018-11-27 17:15:43 UTC) #9
nicoe
https://codereview.tryton.org/60441002/diff/20001/tryton/tryton/common/selection.py File tryton/tryton/common/selection.py (left): https://codereview.tryton.org/60441002/diff/20001/tryton/tryton/common/selection.py#oldcode62 tryton/tryton/common/selection.py:62: self.filter_selection(domain, record, field) On 2018/11/27 17:15:43, ced wrote: > ...
4 months, 3 weeks ago (2018-11-27 17:46:03 UTC) #10
nicoe
Fix remarks
4 months, 3 weeks ago (2018-11-27 17:46:53 UTC) #11
reviewbot
https://codereview.tryton.org/60441002/diff/40001/tryton/tryton/common/__init__.py#newcode3 tryton/tryton/common/__init__.py:3: F403 'from common import *' used; unable to detect undefined names https://codereview.tryton.org/60441002/diff/40001/tryton/tryton/common/__init__.py#newcode4 tryton/tryton/common/__init__.py:4: ...
4 months, 3 weeks ago (2018-11-27 17:52:06 UTC) #12
ced
https://codereview.tryton.org/60441002/diff/40001/sao/src/common.js File sao/src/common.js (right): https://codereview.tryton.org/60441002/diff/40001/sao/src/common.js#newcode2178 sao/src/common.js:2178: prepare_reference_domain: function(domain, field_name) { field_name should be named reference ...
4 months, 2 weeks ago (2018-12-05 09:39:36 UTC) #13
nicoe
Fix remarks
4 months, 1 week ago (2018-12-07 16:26:29 UTC) #14
nicoe
https://codereview.tryton.org/60441002/diff/40001/sao/src/common.js File sao/src/common.js (right): https://codereview.tryton.org/60441002/diff/40001/sao/src/common.js#newcode2178 sao/src/common.js:2178: prepare_reference_domain: function(domain, field_name) { On 2018/12/05 09:39:36, ced wrote: ...
4 months, 1 week ago (2018-12-07 16:26:41 UTC) #15
reviewbot
https://codereview.tryton.org/60441002/diff/60001/tryton/tryton/common/__init__.py#newcode3 tryton/tryton/common/__init__.py:3: F403 'from common import *' used; unable to detect undefined names https://codereview.tryton.org/60441002/diff/60001/tryton/tryton/common/__init__.py#newcode4 tryton/tryton/common/__init__.py:4: ...
4 months, 1 week ago (2018-12-07 16:50:33 UTC) #16
ced
https://codereview.tryton.org/60441002/diff/60001/sao/src/common.js File sao/src/common.js (right): https://codereview.tryton.org/60441002/diff/60001/sao/src/common.js#newcode2263 sao/src/common.js:2263: extract_reference_models: function(domain, field_name) { Idem both reference function should ...
4 months, 1 week ago (2018-12-11 10:05:08 UTC) #17
nicoe
https://codereview.tryton.org/60441002/diff/60001/sao/src/common.js File sao/src/common.js (right): https://codereview.tryton.org/60441002/diff/60001/sao/src/common.js#newcode2263 sao/src/common.js:2263: extract_reference_models: function(domain, field_name) { On 2018/12/11 10:05:08, ced wrote: ...
4 months ago (2018-12-19 17:42:26 UTC) #18
nicoe
fix remarks
4 months ago (2018-12-19 17:43:07 UTC) #19
reviewbot
https://codereview.tryton.org/60441002/diff/80001/tryton/tryton/common/__init__.py#newcode3 tryton/tryton/common/__init__.py:3: F403 'from common import *' used; unable to detect undefined names https://codereview.tryton.org/60441002/diff/80001/tryton/tryton/common/__init__.py#newcode4 tryton/tryton/common/__init__.py:4: ...
4 months ago (2018-12-19 18:11:48 UTC) #20
ced
LGTM
4 months ago (2018-12-19 19:50:16 UTC) #21
rietveld-bot_tryton.org
New changeset 95501e406c46 by Nicolas ?vrard in branch 'default': Fix domain inversion of child_of mixing ...
3 months, 4 weeks ago (2018-12-20 17:46:30 UTC) #22
rietveld-bot_tryton.org
New changeset 065511721170 by Nicolas ?vrard in branch 'default': Fix domain inversion of child_of mixing ...
3 months, 4 weeks ago (2018-12-20 17:46:32 UTC) #23
rietveld-bot_tryton.org
New changeset 88ea15d0dead by Nicolas ?vrard in branch 'default': Fix domain inversion of child_of mixing ...
3 months, 4 weeks ago (2018-12-20 17:46:36 UTC) #24
rietveld-bot_tryton.org
New changeset 1e0aeb0854b5 by Nicolas Évrard in branch '5.0': Fix domain inversion of child_of mixing ...
3 months, 2 weeks ago (2018-12-30 18:10:32 UTC) #25
rietveld-bot_tryton.org
3 months, 2 weeks ago (2018-12-30 18:10:56 UTC) #26
New changeset f5b886023a10 by Nicolas Évrard in branch '5.0':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/tryton/rev/f5b886023a10


New changeset e77b88fe6393 by Nicolas Évrard in branch '4.8':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/tryton/rev/e77b88fe6393


New changeset 6f6696faf11f by Nicolas Évrard in branch '4.6':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/tryton/rev/6f6696faf11f


New changeset 51d941caacfd by Nicolas Évrard in branch '4.4':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/tryton/rev/51d941caacfd


New changeset c1e5655f02d9 by Nicolas Évrard in branch '4.2':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/tryton/rev/c1e5655f02d9
Sign in to reply to this message.

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