Disable Create and Edit on Many2One Field
by Steven Marp https://apps.odoo.com/apps/modules/browse?author=Steven Marp$ 18.02
Disable Create and Edit on Many2One Field
No Quick Create
The Create option is removed from Many2one dropdowns, so users cannot create new records by typing a name in the field.
No Create and Edit
The Create and Edit option is also removed, so users cannot open the creation popup form from the dropdown.
Search More Only
Users can still search and pick existing records with the dropdown and the Search More dialog. Selecting data keeps working as usual.
Per User Control
A checkbox on the user form lets you allow trusted users to keep creating and editing records from Many2one fields.
Works Everywhere
Applies to every Many2one field in every app: Sales, Purchase, Invoicing, Inventory, CRM and any custom module.
Clean Master Data
Stops accidental duplicate partners, products and other master data created while filling in daily documents.
1. Dropdown Shows Search More Only
After installation, users open a Many2one field and only see existing records and Search More. The Create and Create and Edit options are gone.
2. Allow a Specific User
Open Settings, Users and Companies, Users. On the Access Rights tab, check Allow To Create or Edit Many2One Field for users who should keep the standard behavior.
3. Allowed Users Keep Create Options
Users with the checkbox enabled see the normal dropdown with Create and Create and Edit, exactly like standard Odoo.
1. Install the module. Create and Create and Edit are disabled on Many2one dropdowns for all users.
2. Users can still pick existing records from the dropdown or through Search More.
3. To allow a user, go to Settings, Users and Companies, Users and open the user.
4. On the Access Rights tab, check Allow To Create or Edit Many2One Field and save.
5. The user reloads the browser page and gets the standard create options back.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 57 |
| Technical Name |
sm_disable_create_edit_many2one |
| License | OPL-1 |
| Website | https://apps.odoo.com/apps/modules/browse?author=Steven Marp |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module