Domain inversion for child_of does not work when the domain use a reference field.
We stumbled upon a domain on timesheet.line writen like this:
[[u'work.origin.parent', u'child_of', [663], u'project.work']]
When the domain inversion for the field 'work' is triggered it results in the following domain:
[[u'project.work', u'child_of', [663]]]
Which can not work.
The solution is to check in inverse_leaf the number of dots in case of inversion of a child_of.
If there's more than one dot than we just need to remove the local part otherwise we keep it.
Reference field must also be modified to support to take into account the child_of case and prepare the domain in domain_get.
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Nicolas Évrard assigned to @nicoe
assigned to @nicoe
- Nicolas Évrard added sao tryton type::behavior + 1 deleted label
added sao tryton type::behavior + 1 deleted label
- Nicolas Évrard added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
New review60441002 at https://codereview.tryton.org/60441002/#ps1
review60441002 updated at https://codereview.tryton.org/60441002/#ps20001
review60441002 updated at https://codereview.tryton.org/60441002/#ps40001
review60441002 updated at https://codereview.tryton.org/60441002/#ps60001
review60441002 updated at https://codereview.tryton.org/60441002/#ps80001
New changeset 95501e406c46 by Nicolas ?vrard in branch 'default':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/sao/rev/95501e406c46- Roundup Robot added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
- Roundup Robot closed
closed
New changeset 065511721170 by Nicolas ?vrard in branch 'default':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/tryton/rev/065511721170New changeset 88ea15d0dead by Nicolas ?vrard in branch 'default':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/tryton-env/rev/88ea15d0dead- Owner
Array.includes can not be used as it is not supported by IE nor phanthomjs. More over as it is a fix that should be back-ported, I do not think it is right to use polyfill.
- Cédric Krier added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
- Cédric Krier reopened
reopened
New changeset 01cdf2301b04 by Cédric Krier in branch 'default':
Replace Array.includes by ~Array.indexOf
https://hg.tryton.org/sao/rev/01cdf2301b04- Roundup Robot added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
- Roundup Robot closed
closed
New changeset 4cfecba15a5e by Cédric Krier in branch 'default':
Replace Array.includes by ~Array.indexOf
https://hg.tryton.org/tryton-env/rev/4cfecba15a5eNew changeset 1e0aeb0854b5 by Nicolas Évrard in branch '5.0':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/sao/rev/1e0aeb0854b5
New changeset 0a6b11e441ba by Cédric Krier in branch '5.0':
Replace Array.includes by ~Array.indexOf
https://hg.tryton.org/sao/rev/0a6b11e441ba
New changeset 1226c9bd3976 by Nicolas Évrard in branch '4.8':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/sao/rev/1226c9bd3976
New changeset 915611c29b72 by Cédric Krier in branch '4.8':
Replace Array.includes by ~Array.indexOf
https://hg.tryton.org/sao/rev/915611c29b72
New changeset 71661984d777 by Nicolas Évrard in branch '4.6':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/sao/rev/71661984d777
New changeset 91c40fb2d2c8 by Cédric Krier in branch '4.6':
Replace Array.includes by ~Array.indexOf
https://hg.tryton.org/sao/rev/91c40fb2d2c8
New changeset 358b0841e2c4 by Nicolas Évrard in branch '4.4':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/sao/rev/358b0841e2c4
New changeset efcfa0428588 by Cédric Krier in branch '4.4':
Replace Array.includes by ~Array.indexOf
https://hg.tryton.org/sao/rev/efcfa0428588
New changeset 300ee33f86e1 by Nicolas Évrard in branch '4.2':
Fix domain inversion of child_of mixing M2O and Reference fields
https://hg.tryton.org/sao/rev/300ee33f86e1
New changeset 67a35c93d3de by Cédric Krier in branch '4.2':
Replace Array.includes by ~Array.indexOf
https://hg.tryton.org/sao/rev/67a35c93d3deNew 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- Cédric Krier mentioned in issue #7876 (closed)
mentioned in issue #7876 (closed)
- Cédric Krier mentioned in issue #8300 (closed)
mentioned in issue #8300 (closed)