Tryton - Issues

 

Issue7501

Title Ensure no field depends on itself
Priority bug Status testing
Superseder Nosy List ced, pokoli, reviewbot
Type crash Components trytond
Assigned To pokoli Keywords review
Reviews 46551002
View: 46551002

Created on 2018-06-05.15:33:52 by pokoli, last changed by reviewbot.

Messages
review46551002 updated at https://codereview.tryton.org/46551002/#ps20001
New review46551002 at https://codereview.tryton.org/46551002/#ps1
msg41247 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-06-05.16:37:11
Then we should raise it as a bug. 

Here is review46551002 that prevents the infinite loop.
msg41246 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-06-05.15:37:16
I would prefer to fix the infinite loop because I guess this can also happen if a field depend on a field that depend on the first one.
msg41245 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-06-05.15:33:51
We recently found that if you add a read access restriction to a field that depends on itself it causes an infinite loop on the server causing it to halt. 

This is because a field is removed from the view if the user is not allowed to access one of it's dependant fields [1]. This causes an infinite loop if the field depends on itself. 

I think we can improve test depends to ensure that a field does not depend on itself. 

[1] http://hg.tryton.org/trytond/file/e4061cc9c9b0/trytond/model/modelview.py#l403
History
Date User Action Args
2018-06-06 12:27:56reviewbotsetmessages: + msg41271
2018-06-05 16:57:36reviewbotsetnosy: + reviewbot
messages: + msg41248
2018-06-05 16:57:35reviewbotsetreviews: 46551002
keyword: + review
2018-06-05 16:37:12pokolisetstatus: chatting -> testing
priority: feature -> bug
type: feature request -> crash
messages: + msg41247
assignedto: pokoli
2018-06-05 15:37:16cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg41246
2018-06-05 15:33:52pokolicreate

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