summaryrefslogtreecommitdiff
path: root/addons/payment_sips/models
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-05-31 08:55:24 +0200
committerAaron Bohy <aab@odoo.com>2017-05-31 20:53:55 +0200
commitf9a1241721d1457dd7ddd0eebb1ec0ba4fba3225 (patch)
tree1ee5226cf3bbc54e5fefa1febaccb953bc0d47ff /addons/payment_sips/models
parent23613b411feb6571c0f2907d8c88a7e8f8e39d87 (diff)
[FIX] web: editable list: don't create invalid records
Clicking multiple times on 'Create' (in main list views) or 'Add an item' (in o2m lists) might create invalid rows (i.e. rows with required fields unset). Creating a new record requires two sequential RPCs: a default_get and an onchange (only if there is an onchange of one of the record's field). When clicking twice to create a new record, that sequence of RPCs is done twice in parallel, after unselecting the current row (i.e. saving it if it is valid). However, in both cases, there is no line to unselect yet (as both operations are done basically simultaneously). When the first onchange returns, a first new record is added to the list. When the second returns, the second one is added and takes the edition, leaving the first one, invalid, in the list. This rev. ensures this doesn't happen by preventing concurrent record creation.
Diffstat (limited to 'addons/payment_sips/models')
0 files changed, 0 insertions, 0 deletions