Tryton - Issues



Title Parent's on_change modifying a value is not reflected on the line
Priority bug Status testing
Superseder Nosy List ced, nicoe, reviewbot
Type behavior Components tryton
Assigned To nicoe Keywords backport, review
Reviews 289791002
View: 289791002

Created on 2020-04-16.10:09:03 by nicoe, last changed by reviewbot.

File name Uploaded Type Edit Remove
entry_concurrency.tgz nicoe, 2020-04-16.10:09:02 application/x-gtar-compressed
review289791002 updated at
review289791002 updated at
review289791002 updated at
review289791002 updated at
review289791002 updated at
msg57210 (view) Author: [hidden] (nicoe) (Tryton committer) Date: 2020-04-16.23:28:22
I updated the patch to synchronize the value between the record and the entry on display
msg57197 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-04-16.10:43:47
Why not stop the edition when clicking on a button? I guess a grab focus should be enough.
msg57193 (view) Author: [hidden] (nicoe) (Tryton committer) Date: 2020-04-16.10:09:02
The attached tarball contains a minimal module displaying the behaviour that I will try to explain the more clearly possible. To display it you should install this module, create a new "Header" and in the header create a new "Line". You select "Split" for the status of the line and a quantity > 1.

The code in Header splits the quantity and create a new line with the remaining quantity. Unfortunately the quantity of the current line although set by the on_change does not change even if you quit the cell. This behavior is tryton specific and works as expected on sao.

I identified that the origin of the error is the fact that the editable widget attached to the cell is not updated when we receive the data from the on_change call while the value stored in the record is indeed changed.

The way I fixed it is by modifying the 'on_editing_done' (which is called a second time because the value changed) to skip the method if the cell has been updated. But while reviewing my patch I noticed that it was the same as testing if the widget related to the column has an editable entry linked to it. Which makes the whole function useless (you can access my WIP in the review if you want a clearer view of the changes I did … it's in
Date User Action Args
2020-05-18 15:00:03reviewbotsetmessages: + msg58103
2020-05-13 10:06:14reviewbotsetmessages: + msg57982
2020-05-11 10:09:43reviewbotsetmessages: + msg57945
2020-05-04 10:19:59cedsetkeyword: + backport
2020-04-29 15:14:30reviewbotsetmessages: + msg57708
2020-04-29 14:39:22reviewbotsetnosy: + reviewbot
messages: + msg57707
2020-04-24 22:00:10cedsetstatus: chatting -> testing
2020-04-16 23:28:22nicoesetmessages: + msg57210
2020-04-16 10:43:48cedsetstatus: unread -> chatting
nosy: + ced
messages: + msg57197
2020-04-16 10:09:03nicoecreate

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