Tryton - Issues

 

Issue8482

Title on_change's processed too late
Priority bug Status resolved
Superseder Nosy List ced, reviewbot, roundup-bot
Type behavior Components sao
Assigned To ced Keywords review
Reviews 273571002, 264081002
View: 273571002, 264081002

Created on 2019-07-10.17:13:02 by ced, last changed by roundup-bot.

Messages
New changeset f25ed437476f by Cédric Krier in branch 'default':
Do not expect promise from Record.set
https://hg.tryton.org/tryton-env/rev/f25ed437476f
New changeset 6cfb4a009f64 by Cédric Krier in branch 'default':
Do not expect promise from Record.set
https://hg.tryton.org/sao/rev/6cfb4a009f64
New review264081002 at https://codereview.tryton.org/264081002/#ps257991002
New changeset 8b999fa8e1d2 by Cédric Krier in branch 'default':
Use synchronous calls for on_change's and Field.set
https://hg.tryton.org/tryton-env/rev/8b999fa8e1d2
New changeset 8345380bb435 by Cédric Krier in branch 'default':
Use synchronous calls for on_change's and Field.set
https://hg.tryton.org/sao/rev/8345380bb435
review273571002 updated at https://codereview.tryton.org/273571002/#ps287721002
msg50608 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-10.17:22:37
We can expect a small lag when the connection has a long delay (but nothing greater than with tryton).
msg50607 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-10.17:17:13
For me, the main problem is that rpc call from events like focus-out are done asynchronously but the order is important.
So I think we should convert those calls to be synchronous. This will behave closer to tryton and simplify the code.
msg50606 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-07-10.17:13:02
There are some cases where the on_changes are processed too late.
For example, when filling a invoice line by setting the unit price (without loosing focus) and click on "OK". In this case the amount is not updated because the initial on_change which is triggered by the focus out is not yet finished (display is not yet called) when the form call set_value on the view. So the previous value still on the widget is set back.
History
Date User Action Args
2019-08-22 22:44:54roundup-botsetmessages: + msg51427
2019-08-22 22:44:52roundup-botsetstatus: chatting -> resolved
messages: + msg51425
2019-08-19 18:04:25reviewbotsetstatus: resolved -> chatting
messages: + msg51352
2019-08-19 18:04:24reviewbotsetreviews: 273571002 -> 273571002, 264081002
2019-07-25 12:28:37cedlinkissue8529 superseder
2019-07-17 22:41:08roundup-botsetmessages: + msg50696
2019-07-17 22:41:04roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg50695
2019-07-10 17:38:33reviewbotsetnosy: + reviewbot
messages: + msg50609
2019-07-10 17:22:38cedsetmessages: + msg50608
2019-07-10 17:20:12cedsetstatus: in-progress -> testing
reviews: 273571002
keyword: + review

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