Issue 9930

Title
Setting the value of an unloaded field in a O2M on_change() call the lines added are added twice.
Priority
bug
Status
chatting
Nosy list
nicoe, reviewbot
Assigned to
nicoe
Keywords
review

Created on 2020-12-09.18:59:58 by nicoe, last changed 6 days ago by reviewbot.

Messages

Author: [hidden] (nicoe) Tryton committer
Date: 2020-12-09.18:59:57

This happens because the client fetches the new field definition which will trigger a default_get() call which if it sets the value of the field will also trigger the on_change() of the parent.

Thus the on_change() is called twice and the added lines are added twice.

History
Date User Action Args
2021-01-15 18:29:15reviewbotsetmessages: + msg63895
2020-12-11 11:31:54reviewbotsetmessages: + msg62709
nosy: + reviewbot
status: unread -> chatting
2020-12-09 19:00:19nicoesettitle: Setting the value of an unloaded field in a O2M `on_change()` call the lines added are added twice. -> Setting the value of an unloaded field in a O2M on_change() call the lines added are added twice.
2020-12-09 19:00:04nicoesetkeyword: + review
reviews: 302811002
2020-12-09 18:59:58nicoecreate

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