-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] web: BasicModel: clear x2many changes after save
Before this commit, after a save, we didn't remove the changes in x2many fields (StaticList). As a consequence, if save was called twice on a record with changes in a x2many, those changes were sent twice to the server. In particular, if those changes involved a command 0 (create), the record was created twice. To reproduce the issue, go to a sale order, add a line, select a product, click out to validate the row, then click several times on the product. As you clicked several times, several doAction are asked to the action service. For each of them, the form view is asked to save its changes, and thus the same row is created multiple times. After this fix, the changes in x2manys are cleared after the first save, so there's no change the save for the subsequent calls. opw-3268947 opw-3324848 closes odoo#123394 X-original-commit: 0fd8358 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters