I am concerned about the status of record locking in TinyERP.

A simple example (v4.0.3) ...

I open a partner record and start typing a long note on the extra info page.
Another user opens the same partner and quickly updates the mobile phone number 
and saves it.
I finish my note and save it
The new mobile number is lost.

... any updates made by other user(s) between me fetching the record and saving 
it are lost (without warning).

A more critical example ...

It seems that 2 people can pick the SAME order at the same time!

I am new to TinyERP so if I am missing something obvious please inform me!

I don't know how the underlying writes are performed - I assume you are 
replacing the whole record from my local copy not just the changed fields?

If you don't want to use something like SQL "SELECT FOR UPDATE" which might bar 
access, could you add a "WHERE write_date = ..." to the SQL statement to cause 
the update to fail if the write_date is not what it was when you read the 
record? All the tables seem to be timestamped already.

In the event that PostrgreSQL reports 0 rows were written instead of 1 row you 
could inform the user and give them the opportunity to "continue regardless" or 
"abort".





_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to