1509
|
|
|
Bogdan Stanciu |
12 years ago
|
|
|
1508
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1507
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1506
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1505
|
|
[FIX] synchronization of o2m widget saving, avoid race condition when clicking on button of unsaved record
After saving, the formview would both refresh the form and lauch the action itself, which launches a refresh of its own.
Issue is that o2m's filling of themselves (a read) is async and triggered by the set_value on the o2m field, so the second reload of the form would be interspersed (between the first reload and the end of the o2ms loading), resulting in corrupted state for the o2ms if the button's action somehow changed the contents of the o2m (it would remove the old records and return brand new ids during the refresh): the set_value on the o2m would empty the o2m's dataset cache, and the returning fetch request would try to find in cache values removed from it, or something, blowing up everything.
Anyway, this was fixed by ensuring the button action is only executed after the form is completely done doing its post-save reload (using the new async set_value). This is a tiny bit brittle in that onchanges are synchronous but call set_value, so a set_value on an o2m from an onchange may have issues. It also increases the flicker of the view, as the o2m is reloaded twice in quick succession.
|
Xavier Morel |
12 years ago
|
|
|
1504
|
|
|
Xavier Morel |
12 years ago
|
|
|
1503
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1502
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1501
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1500
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1499
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1498
|
|
|
Christophe Simonis |
12 years ago
|
|
|
1497
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1496
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1495
|
|
|
niv-openerp |
12 years ago
|
|
|
1494
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1493
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1492
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1491
|
|
|
Fabien Meghazi |
12 years ago
|
|
|
1490
|
|
|
Xavier Morel |
12 years ago
|
|
|