Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
•
Sales (sale_management)
• Discuss (mail) • Invoicing (account) |
Lines of code | 78 |
Technical Name |
eis_hide_margin |
License | OPL-1 |
Website | https://expertpk.com |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
•
Sales (sale_management)
• Discuss (mail) • Invoicing (account) |
Lines of code | 78 |
Technical Name |
eis_hide_margin |
License | OPL-1 |
Website | https://expertpk.com |

Hide Sale Margin for Odoo
Secure Your Sales Data with Role-Based Access Control
Introduction to Hide Sale Margin
Control Margin Visibility with Ease
The Hide Sale Margin module for Odoo 18 empowers businesses to restrict access to sensitive sales margin data (margin, margin percentage, and purchase price) based on user roles. By leveraging Odoo’s security groups, only users with the 'Margin Manager' role can view margin-related fields, ensuring financial data privacy for your team. Perfect for Pakistani businesses and global enterprises seeking granular control over sales data.
This module is lightweight, easy to configure, and integrates seamlessly with Odoo’s sales workflow, making it an essential tool for businesses prioritizing data security and compliance.
Why Choose Hide Sale Margin?
Enhanced Security
Restrict margin visibility to authorized users only, protecting sensitive financial data.
Seamless Integration
Works effortlessly with Odoo 18’s sales and margin modules.
Role-Based Access
Assign margin visibility to specific users via the Margin Manager group.
Key Features
Powerful Functionality for Data Control
Hide Margin Fields
Conceal margin, margin percentage, and purchase price from non-authorized users.
Security Group Control
Restrict access using the 'Margin Manager' security group for precise user management.
Easy Configuration
Quick setup with minimal changes to existing Odoo sales workflows.
Odoo 18 Compatible
Fully compatible with Odoo 18 Community and Enterprise editions.
Configuration Guide
Setting Up Margin Restrictions
Configure the module in Odoo by assigning the 'Margin Manager' security group to users who should view margin data. Non-authorized users will not see margin, margin percentage, or purchase price fields in sales orders or reports.
Steps to Configure
- Go to **Settings** > **Users & Companies** > **Groups**.
- Search for “Margin Manager” under the “Show Margin” category.
- Add users who need access to margin fields to the “Margin Manager” group.
- Verify that margin fields are hidden for users without the group in **Sales** > **Orders**.
Version Information
Built for Odoo 18
Current Version: 18.0.1.0.1
Released: May 2025
Compatibility: Odoo 18 Community and Enterprise editions
This module is actively maintained and not an official Odoo module.
Screenshots
Explore the Module in Action

Margin Hidden for Non-Authorized Users
Margin fields are invisible to users without the Margin Manager group.

Margin Visible for Authorized Users
Users in the Margin Manager group can view margin, margin percentage, and purchase price.

Security Group Configuration
Assign users to the Margin Manager group in Odoo settings.

Margin Visible for Authorized Users in Sale Report
Assign users to the Margin Manager group in Odoo settings.

Margin Hidden for Non-Authorized Users in Report
Users in the Margin Manager group can view margin in sale analysis pivot report.
Support
We’re Here to Help
Need assistance with the Hide Sale Margin module? Contact our dedicated support team:

Send Message on WhatsApp!
Hide Sale Margin
Overview
The Hide Sale Margin module for Odoo 18 restricts visibility of sale margin fields (margin, margin percentage, and purchase price) to users with the 'Margin Manager' security group. This module enhances data security by ensuring sensitive financial information is only accessible to authorized users, making it ideal for businesses in Pakistan and globally.
Features
- Role-Based Access Control: Hide margin, margin percentage, and purchase price from non-authorized users.
- Security Group Integration: Uses the 'Margin Manager' group to control access.
- Seamless Compatibility: Integrates with Odoo’s sale_margin module for Odoo 18.
- User-Friendly Configuration: Easily assign margin visibility via Odoo’s group settings.
Installation
Prerequisites
- Odoo 18 installed and running.
- The sale_margin module installed.
Steps
- Download the Module: Obtain from the repository or marketplace.
- Extract: Unzip to your Odoo addons directory (e.g., /path/to/odoo/addons/eis_hide_margin).
- Update Modules List: In Odoo, go to Apps > Update Apps List.
- Install: Search for "Hide Sale Margin" and click Install.
Configuration
Steps
- Configure Security Group: - Navigate to Settings > Users & Companies > Groups. - Find the “Margin Manager” group under the “Show Margin” category. - Add users who need access to margin fields to the “Margin Manager” group. - Save the configuration.
- Verify Access: - Log in as a non-authorized user to confirm margin fields (margin, margin percentage, purchase price) are hidden in Sales > Orders and reports. - Log in as a 'Margin Manager' user to verify visibility of margin fields.
Usage
- User Experience: - Non-authorized users will not see margin, margin percentage, or purchase price fields in sales orders or reports. - Users in the 'Margin Manager' group will have full access to these fields.
- Admin Monitoring: - Check group assignments in Settings > Users & Companies > Groups. - Ensure the 'Margin Manager' group is correctly assigned to authorized users.
Technical Details
Architecture
- Models: - sale.report: Extended to restrict the margin field to the 'Margin Manager' group.
- Views: - Inherits sale_margin views to add group-based restrictions on margin, margin percentage, and purchase price fields.
- Security: - Defines the 'Margin Manager' group and 'Show Margin' category. - Applies rules to ensure only authorized users access margin data.
Security
- Uses Odoo’s security group mechanism to enforce field-level access control.
- Automatically includes base.user_root and base.user_admin in the 'Margin Manager' group.
Customization
- Group Assignment: Modify user assignments in the 'Margin Manager' group to control access.
Troubleshooting
- Margin Fields Still Visible: Verify that the user is not in the 'Margin Manager' group.
- Fields Not Visible for Authorized Users: Ensure the user is assigned to the 'Margin Manager' group.
- Logs: Enable debug mode (--log-level=debug) to trace issues.
Support
For assistance, contact: - Email: support@expertpk.com - WhatsApp: +92 300 7888 120
Note
Ensure the sale_margin module is installed before using this module. The 'Margin Manager' group is pre-assigned to admin users for immediate functionality.
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