Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Extra Tools
  3. Attachment Security - Control Access & Delete Permissions v 16.0
  4. Sales Conditions FAQ

Attachment Security - Control Access & Delete Permissions

by LucidBrainz https://lucidbrainz.com/?i=1
Odoo

$ 0.01

v 16.0 Third Party
Live Preview
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 81
Technical Name attachment_security
LicenseLGPL-3
Websitehttps://lucidbrainz.com/?i=1
Versions 16.0 17.0 18.0 19.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 81
Technical Name attachment_security
LicenseLGPL-3
Websitehttps://lucidbrainz.com/?i=1
Versions 16.0 17.0 18.0 19.0

Attachment Security - Control Access & Delete Permissions

User-Based Attachment Visibility | Delete Permission Control | Creator-Only Access | Access Rights Management


Overview

Attachment Security by LucidBrainz is a comprehensive attachment management solution for Odoo 16 that provides granular control over who can view and delete attachments throughout your system. This module implements intelligent visibility controls where users can see only their own attachments by default, with additional access granted for attachments linked to records they have read permissions for. The solution features flexible delete permissions with three-tier control: superusers can delete any attachment, specially authorized users with "Can Delete Any Attachment" permission can manage all attachments, and regular users can only delete attachments they created. Built with zero database modifications using pure XML view inheritance and Python model extensions, the module ensures complete data safety without any risk of corruption. Features smart access control with readonly inherited addresses for child contacts, universal compatibility across all Odoo modules including Sales, CRM, Invoicing, Purchase, HR, and Projects, and professional error messages guiding users when access is denied. The lightweight architecture adds a single boolean field to res.users model for delete permissions, implements computed visibility field on ir.attachment without storage overhead, and overrides unlink method with permission checks. Perfect for multi-user environments requiring data privacy, companies with confidential document management needs, organizations following security compliance standards, and businesses wanting to prevent accidental or unauthorized attachment deletions. System administrators can easily grant delete permissions through the user settings interface with a simple toggle switch visible only to admin users. The module activates immediately after installation with no configuration required, preserves all existing attachment data and access patterns, and provides clear access error messages to users. Ready to secure your attachments with enterprise-grade permission controls!

Key Features

  • Intelligent Visibility Control: Implements smart attachment visibility where users see only their own uploaded attachments by default. Automatically grants access to attachments linked to records (sales orders, invoices, etc.) where user has read permissions. Superusers maintain full visibility across all attachments for administrative oversight
  • Three-Tier Delete Permission System: Granular delete control with superuser level (delete anything), authorized user level (Can Delete Any Attachment permission), and creator level (delete own attachments only). Prevents unauthorized deletion while providing flexibility for document managers and administrators
  • Can Delete Any Attachment Permission: New user-level permission toggle available in Settings → Users & Companies → Users → Access Rights tab. Visible and modifiable only by system administrators (base.group_system). Enables selective granting of delete permissions to trusted users without making them superusers
  • Creator-Only Default Access: Regular users restricted to managing only attachments they personally uploaded. Automatic creator tracking using create_uid field ensures accurate ownership determination. Protects confidential documents and prevents accidental data loss from unauthorized deletions
  • Linked Record Permission Inheritance: Smart context-aware access where attachment visibility extends based on linked record (res_model + res_id) permissions. Users with read access to a sale order automatically see order attachments. Seamless integration with existing Odoo record-level security rules
  • Professional Access Error Messages: Clear, user-friendly error dialogs when delete attempts fail. Message reads "You are not allowed to delete this attachment. Only the creator or users with special permissions can delete attachments." Guides users without technical jargon
  • Zero Database Risk Architecture: No modification to ir.attachment table structure, no custom database tables created, no data migration scripts required. Visibility computed on-the-fly without storage overhead. Can be uninstalled cleanly without any data loss or orphaned records
  • Lightweight Python Implementation: Minimal code footprint with just two model extensions (ir.attachment and res.users). No controllers, no JavaScript, no complex dependencies. Single computed boolean field (visible) with @api.depends decorators ensuring efficient recalculation only when needed
  • Universal Module Compatibility: Works seamlessly across all Odoo applications - Sales quotations and orders, Customer and supplier invoices, Purchase RFQs and orders, CRM leads and opportunities, HR employee documents, Project attachments, Email attachments in chatter, and any custom module using res.partner or attachments
  • Multi-User Environment Optimized: Perfect for organizations with multiple users sharing database. Prevents users from seeing each other's private attachments. Maintains data privacy without complex folder structures or sharing rules. Ideal for companies with confidential document requirements
  • Superuser Administrative Override: System administrators maintain full visibility and delete access regardless of creator. Uses Odoo's built-in _is_superuser() check for reliable admin detection. Ensures system maintenance and data cleanup capabilities are never restricted
  • Computed Visibility Field: Real-time calculation of attachment visibility based on current user context. Uses @api.depends on create_uid, res_model, and res_id for intelligent dependency tracking. Store=False ensures no database write overhead while maintaining accurate access control
  • Access Rights Integration: Leverages Odoo's native access control system (check_access_rights and check_access_rule) for linked record permission checking. No reinvention of security wheel - extends and integrates with existing ir.model.access and record rules
  • Smart Search Filtering: Overridden search_read method automatically filters attachment lists showing only accessible items. Users see clean attachment lists without permission-denied errors. Public attachments remain visible to all users for shared resources
  • Chatter Attachment Integration: Works perfectly with Odoo's message/chatter system where documents are attached to form views. Maintains chatter functionality while adding security layer. Email attachments follow same permission rules as manual uploads
  • Readonly Field Management: Groups attribute (groups='base.group_system') ensures Can Delete Any Attachment toggle visible only to administrators. Prevents regular users from modifying their own permissions. Maintains security hierarchy and prevents privilege escalation
  • Easy Configuration Interface: Simple toggle switch in user settings - no complex permission matrices or XML editing required. Changes take effect immediately without server restart. Administrators can quickly grant or revoke delete permissions as roles change
  • Instant Activation: Zero configuration required after installation. Module activates automatically applying security rules to all existing attachments. No data initialization scripts, no setup wizards, no manual CSV imports. Works out-of-the-box immediately after clicking Install button

Odoo 16 Attachment Security Module Screenshots

User Settings with Can Delete Any Attachment Permission



👤 USER PERMISSION SETTING: Settings → Users & Companies → Users interface showing the "Can Delete Any Attachment" toggle field. Located in Access Rights section under "ATTACHMENT PERMISSIONS" heading. Admin-only visible toggle (base.group_system) for granting special delete privileges to trusted users.
Sale Order with Attachment Visible to Creator



📎 ATTACHMENT VISIBILITY: Sales Order (S00022) showing attached PDF file "employeement_certificate.pdf" in the Files panel. User "Mitchell Admin" who created the attachment can see and access it. Attachment visible because user is the creator (create_uid match) and has access rights to the linked sale order record.
Users List View



📋 USERS LIST VIEW: Settings → Users & Companies → Users list showing "Marc Demo" and "Mitchell Admin" users. System administrators can select any user to modify their attachment delete permissions. User authentication status and language preferences displayed for administrative oversight.
Delete Button on Attachment



🗑️ DELETE ATTEMPT INITIATED: User "Marc Demo" logged in (top right corner) viewing Sale Order S00022. Red delete icon (trash button) visible next to "employeement_certificate.pdf" attachment. User attempting to delete attachment that was created by different user (Mitchell Admin). Delete button click will trigger permission validation.
Access Error Dialog



⛔ ACCESS DENIED MESSAGE: Professional error dialog displayed when user "Marc Demo" attempts to delete attachment created by "Mitchell Admin". Clear message reads "You are not allowed to delete this attachment. Only the creator or users with special permissions can delete attachments." User-friendly guidance without technical jargon. OK button to dismiss error.


VIEW OUR MORE APPS

Our Services

Odoo
Implementation

Odoo
Customization

Odoo
Migration

Support &
Maintenance



📞 Contact Us

WhatsApp:
+91 8686786108

Email:
lucidbrainzinfotech@gmail.com

Website:
www.lucidbrainz.com

🌐 Follow Us

📘 Facebook 📸 Instagram 💼 LinkedIn 🎥 YouTube

© 2025 LucidBrainz | All Rights Reserved | License: LGPL-3 | Version: 16.0.1.0.0

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with