On Sunday, May 10, 2015 at 11:40:04 PM UTC+2, Cédric Krier wrote: > > On 10 May 02:25, Simon Klemenc wrote: > > > > > > On Sunday, May 10, 2015 at 12:44:13 AM UTC+2, Albert Cervera Areny > wrote: > > > > > > 2015-05-09 22:47 GMT+02:00 Simon Klemenc <[email protected] > > > <javascript:>>: > > > > Hi, me once again... > > > > > > > > I need your advice as i'm running into concurrency exceptions from > time > > > to > > > > time.... > > > > Whenever that happens it results from a button triggered workflow > > > transition > > > > after changing some field without a save in between... > > > > > > > > How can i avoid these? > > > > can the client be modified to trigger a save before certain actions? > > > > > > The client already saves before executing an action. > > > > > > Are you sure you did not modify that record from another tab after > > > loading the record in the current one? > > > > > > > > > > > best regards > > > > > > Hi albert, > > Thanks for your message, > > I investigated further and found that it is a result of record > modification > > in "validate" > > I think it is semantically wrong to change a record during its > validation. >
What happened in validate is now within a seperate function. So, basically I have a function triggered by a button, that first adds an origin to moves that don't have any, and then does pack() and post() at once... It does so by modifying moves and calling save() on them... something like: https://gist.github.com/hiaselhans/965bcc2a5fcac7bca138 > > So, is it better to move the logic to on_change or so? > > Hard to say without knowing what you try to achieve. > > > can a client update be triggered in validate? > > I don't understand what you mean. > before the logic used to be in the validate function, when saving first and packing afterwards there was no issue....
