Tryton - Issues

 

Issue7869

Title Domain inversion for child_of does not work when the domain use a reference field.
Priority bug Status testing
Superseder Nosy List nicoe, reviewbot
Type behavior Components sao, tryton
Assigned To nicoe Keywords review
Reviews 60441002
View: 60441002

Created on 2018-11-19.19:13:44 by nicoe, last changed by reviewbot.

Messages
review60441002 updated at https://codereview.tryton.org/60441002/#ps60001
review60441002 updated at https://codereview.tryton.org/60441002/#ps40001
review60441002 updated at https://codereview.tryton.org/60441002/#ps20001
New review60441002 at https://codereview.tryton.org/60441002/#ps1
msg44929 (view) Author: [hidden] (nicoe) (Tryton committer) (Tryton translator) Date: 2018-11-19.19:13:43
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.
History
Date User Action Args
2018-12-07 17:47:24reviewbotsetmessages: + msg45195
2018-11-27 18:48:51reviewbotsetmessages: + msg45047
2018-11-23 11:09:46reviewbotsetmessages: + msg44986
2018-11-20 18:11:07reviewbotsetnosy: + reviewbot
messages: + msg44949
2018-11-20 18:11:06reviewbotsetreviews: 60441002
keyword: + review
2018-11-20 18:01:52nicoesetstatus: in-progress -> testing
2018-11-19 19:13:44nicoecreate

Showing 10 items. Show all history (warning: this could be VERY long)