button enabled before the end of execution
on sao when user create a new record, and then press a button,
this button is enabled, and user can press another clic before
process execution ends.
For example when user create a new internal shipment, and then
press 'Wait' button more than one time, this result on the
execution of sequence assignation more than one time,
and user perceives a sequence jump.
After debugging the code, I can see that it is related to button function
inside screen.js, because when record is not saved, the call to button function
returns immediately. On the other hand, when record has been saved previously
the call to button function return after save record and execute server side
logic.
I can see that it is also related to record.save function, because inside
this function there is a promise to be returned prm = jQuery.when()
but when id < 0 returns prm.done, and when id > 0 returns directly prm.