Odoo Help


How to lock an object to users when there is another user who has opened a form to edit it?

Ratmil Torres
on 2/26/16, 8:21 AM 1,281 views

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.


Ray Carnes

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 2/26/16, 10:26 AM

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 write_date and 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.

See http://stackoverflow.com/questions/18960668/no-concurrency-check-when-updating-records

Thank you

Ratmil Torres
on 2/26/16, 10:33 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/26/16, 8:21 AM
Seen: 1281 times
Last updated: 2/26/16, 10:30 AM