Some user opens an edit form on a object, as long as this user doesn´t close this form I want other users to be denied to editing.
Pessimistic locking is not an option with Odoo, being quite impractical in a stateless web-based environment.
Odoo implements Optimistic Concurrency Control:
For every object, there is a virtual
__last_update field that clients can requests explicitly as part of regular
read() calls, on any model. The value is automatically inferred from the
create_date fields that the framework maintains on any record by default. When the client later makes a
write() call on the same record, it can pass an extra context structure containing the original
__last_update value, and the system will automatically raise an error if the record has been updated in the meantime. See the
_check_concurrency() method for more details.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 2/26/16, 8:21 AM|
|Seen: 430 times|
|Last updated: 2/26/16, 10:30 AM|