Issue 9298

Title
strange behavior on o2m fields with many2many widget
Priority
bug
Status
resolved
Nosy list
ced, mrichez, oqueralto, pokoli, reviewbot, roundup-bot
Assigned to
ced
Keywords
backport, review

Created on 2020-05-05.14:46:17 by oqueralto, last changed yesterday by roundup-bot.

Messages

New changeset 37c3df0a3007 by Cédric Krier in branch 'default':
Keep record added/modified after cancel from popup window
https://hg.tryton.org/tryton-env/rev/37c3df0a3007
New changeset f813fb56a83d by Cédric Krier in branch 'default':
Keep record added/modified after cancel from popup window
https://hg.tryton.org/tryton/rev/f813fb56a83d
New changeset e474e7cddb63 by Cédric Krier in branch 'default':
Keep record added/modified after cancel from popup window
https://hg.tryton.org/sao/rev/e474e7cddb63
Author: [hidden] (mrichez)
Date: 2020-10-21.14:31:41

So it's ok for me.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-10-21.14:28:55

This is the expected behavior because you edit a saved record so canceling makes it be reloaded from the database.
This is needed to correctly detect the user modification only (otherwise we will resent to the server all the fields because they were restored). The button names could be improved see issue9710.

Author: [hidden] (mrichez)
Date: 2020-10-21.14:08:30

There's still something strange. I did my tests using stock_lot. So i add an incoming move (without lot number).
Then i double-click on this line to set a lot number, then OK. there is now a lot number displayed in the treeview.
Then i double-click again on this line and Cancel -> lot number which was displayed on the form view disappear in the tree view.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-10-17.00:38:23
Here is review296601002 which keep the record being added on save.
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-05-05.16:28:11
I think it is linked to issue3325.
Author: [hidden] (oqueralto)
Date: 2020-05-05.16:20:09
It's happening on both.
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-05-05.16:05:02
Are you using tryton, sao or both?
Author: [hidden] (oqueralto)
Date: 2020-05-05.14:46:16
It happens on any o2m field with the many2one widget, but I will explain how to reproduce it on a concrete one:

1. Create a new Supplier shipment. 
2. Add an existing incoming move to the shipment.
3. Open the move form. 
4. Press cancel button or 'Esc' key.
5. Save the shipment or receive it.

If you follow the steps, the move disappears, but for me the expected behavior is to keep it.

I'm using 5.2 version but it's also happening in 5.6.
History
Date User Action Args
2020-10-24 13:15:19roundup-botsetmessages: + msg61201
2020-10-24 13:15:16roundup-botsetmessages: + msg61200
2020-10-24 13:15:14roundup-botsetmessages: + msg61199
nosy: + roundup-bot
status: testing -> resolved
2020-10-21 14:31:41mrichezsetmessages: + msg61098
2020-10-21 14:28:55cedsetmessages: + msg61097
2020-10-21 14:08:30mrichezsetmessages: + msg61096
nosy: + mrichez
2020-10-17 02:05:41cedlinkissue9600 superseder
2020-10-17 00:40:03reviewbotsetnosy: + reviewbot
messages: + msg61019
2020-10-17 00:38:23cedsetstatus: chatting -> testing
reviews: 296601002
messages: + msg61018
keyword: + backport, review
assignedto: ced
2020-05-05 16:28:12cedsetnosy: + ced
messages: + msg57841

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