Issue 10057

Title
One2Many isn’t updating using on_change_with
Priority
bug
Status
testing
Nosy list
ced, manish
Assigned to
Keywords

Created on 2021-02-03.07:54:00 by manish, last changed 2 weeks ago by ced.

Files

File name Uploaded Type Details
before_saving.png manish, 2021-02-03.07:53:59 image/png view

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-04-07.23:42:15

I think it is linked to issue8482. Could you confirm that versions having this change are no more affected?

Author: [hidden] (manish)
Date: 2021-02-03.15:40:39

sao version 5.0.35
and I can test it on trunk.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-02-03.13:03:58

It will be good to have the exact version number and if you can test on trunk.

Author: [hidden] (manish)
Date: 2021-02-03.11:09:15

version 5.0 of sao is in use

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-02-03.10:48:10

Which versions of sao has been tested?

Author: [hidden] (manish)
Date: 2021-02-03.07:53:59

While using on_change_with, the one2many is not updating automatically.
It is getting updated after saving.

@fields.depends(
    'test',
)
def on_change_with_critearea(self):
    vals = []
    if self.test:
        for test_critearea in self.test.critearea:
            vals.append({
                'name': test_critearea.name,
                'lower_limit': test_critearea.lower_limit,
                'upper_limit': test_critearea.upper_limit,
            })
    return vals

The one2many should update after selecting the test type (in screenshot attached).
Only blank spaces are showing.

Note- The same is working fine in gtk-client.

History
Date User Action Args
2021-04-07 23:42:15cedsetmessages: + msg66164
status: chatting -> testing
2021-02-24 14:42:21cedsetmessages: - msg64411
2021-02-24 14:42:17cedsetmessages: - msg64812
2021-02-24 11:51:42manishsetmessages: + msg64812
2021-02-09 07:15:58manishsetmessages: + msg64411
2021-02-03 15:40:39manishsetmessages: + msg64260
2021-02-03 13:03:58cedsetmessages: + msg64255
2021-02-03 11:09:15manishsetmessages: + msg64249
2021-02-03 10:48:10cedsetcomponent: + sao
messages: + msg64248
nosy: + ced
priority: urgent -> bug
status: unread -> chatting
2021-02-03 07:54:00manishcreate

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