This question has been flagged
2120 Views

I would like to know if there is a way to avoid double execution of a function in a button_confirm for example, if state of object has change, without explicit checking current state.

Have you ever try to open an object that has a "Confirm" state in two tabs at same time, then confirm in each one? The code will be executed each time an sometimes it could bring unexpected results, for example, duplicated generation of another object, double calculation, what eve.

I think I could add a condition asking for the object's state but I didn't see anything like that in odoo code.

Any idea?

Thanks in advanced

Avatar
Discard