Hide Product Cost Price (Restriction Based)
by SprintERP Technologies https://www.sprinterp.com$ 4.11
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Technical Name |
se_hide_product_cost_price |
| License | AGPL-3 |
| Website | https://www.sprinterp.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Technical Name |
se_hide_product_cost_price |
| License | AGPL-3 |
| Website | https://www.sprinterp.com |
Hide Product Cost Price
Secure sensitive cost information by blocking access for specific users using advanced Negative Group Logic.
Module Highlights
How the Price Restriction Works
Our module uses a "Restriction-First" approach powered by Odoo's advanced Negative Security Groups. By simply assigning a user to the "Hide cost price" group, the system uses the "!" (NOT) operator to dynamically modify the UI and strip away sensitive costing fields. This ensures that while administrators and procurement managers can see the full financial data, restricted personnel only see the sales and operational information they need to perform their jobs, with zero-leakage of profit margins.
User Access Restriction Setup
Go to Settings > Users & Companies > Users and select the specific user you want to restrict. Under the Extra Rights section, you will find the "Hide cost price in product" checkbox. Simply tick this option to hide the sensitive cost information for this user across the entire system.
Negative Group Logic: This module uses "!" (Not) operator logic, making it extremely easy to block a handful of users from seeing margins without affecting others.
Cost Price Visibility Control
Normal users with appropriate rights can usually see the Cost Price under the 'General Information' tab of a product. By activating our restriction, the Cost field and its label will be completely removed from the view for the restricted user group.
Complete UI Cleanup: The module doesn't just hide the value; it uses Odoo's invisible attribute to ensure the entire row/label is gone, leaving no empty gaps in the UI.
List View Data Protection
Not just the form view, but the Product List (Tree) View is also secured. When the restriction is active, the 'Cost' column is automatically hidden. This prevents unauthorized users from exporting or viewing the entire inventory's cost structure at once.
Global Field Restriction: Our module applies the security group directly to the standard_price field definition in XML, ensuring a consistent lockdown across all Odoo views.
Product Variant Protection
Our security system extends to the Product Variants level. Even when users navigate to specific variants, the Cost Price column remains strictly hidden. This ensures comprehensive data protection across both product.template and product.product models.
Multi-Model Security: The module is designed to inherit multiple views (Template & Variants), leaving no loopholes for sensitive price discovery.
Variant Detail View Security
The restriction is equally effective in the Product Variant Form View. Even if a user opens a specific variant (like a different color or size), the Cost field and its label remain hidden. This ensures that sensitive purchase data is locked down at every possible entry point in the UI.
360° Data Privacy: By targeting both Template and Product models, our module provides a "no-leak" environment for your sensitive company margins.
Activating the Restriction
To apply the security, simply check the "Hide cost price in product" box on the user's profile. Once saved, the Odoo security group will immediately trigger the negative logic, hiding all sensitive cost fields from this specific user's interface across the entire system.
Instant Activation: No server restart is required. Changes take effect as soon as the user's record is saved, providing real-time security management.
Verified Result: Cost Price Hidden
Settings apply hone ke baad ka result aap yahan dekh sakte hain. Restricted user ke liye Product Form se 'Cost' field aur uska label poori tarah gayab ho chuka hai. Ab user sirf Sales Price dekh sakta hai, jisse aapka sensitive profit margin data bilkul safe rehta hai.
Data Privacy Secured: Bina kisi layout breakdown ke, field automatically remove ho jati hai, jo ek clean professional interface banaye rakhti hai.
List View Security Verified
As confirmed in the screenshot above, the 'Cost' column is automatically removed from the Product List View. This prevents unauthorized users from viewing or exporting the cost data of your entire inventory in bulk, providing an extra layer of data privacy.
Mass Export Protection: Since the field is restricted at the view level, users cannot add it back or see it even through the 'Add Custom Field' options.
Variant Detail Privacy Confirmed
As displayed in the result above, the security restriction is fully applied to Product Variant Detail Views as well. Even when a user drills down into specific variants, the Cost Price field is hidden, ensuring no sensitive purchase information is leaked at any level.
Granular Security: The module ensures that whether it's a main product or its variants, your confidential costing remains strictly private for restricted user groups.
Variant List Security Verified
Final verification step mein aap dekh sakte hain ki Product Variants ki Tree View se bhi 'Cost' column ko securely hide kar diya gaya hai. Yeh ensures karta hai ki user variants ke through bhi bulk cost prices access na kar sake, jisse aapka business data har angle se protected rehta hai.
360° Field Lockdown: Template Form, Template List, Variant Form, aur Variant Listâcharon main views par protection successfully verify ho gayi hai.
Module Capabilities & Features
A specialized security utility for Odoo Inventory that empowers businesses to protect sensitive costing data through robust access control.
Cost Confidentiality
Targeted restriction for the standard_price field across the system, ensuring
purchase prices remain visible only to authorized personnel.
Negative Logic Security
Uses advanced "!" operator logic. Instead of giving access to many, simply "Block" the specific users who should not see cost data.
Zero-Leak UI
Ensures that even the field labels for cost prices are completely removed from the view, maintaining a clean and secure interface.
Comprehensive Protection
Secures data across Product Form views (Templates & Variants), List/Tree views, and even Product Labels or Groups.
Lightweight Architecture
Optimized for Odoo with clean XPath inheritance. Zero impact on database speed or system processing performance.
Margin Protection
Prevents sales staff or unauthorized users from calculating sensitive company margins by keeping the base cost strictly private.
Need Any Help?
Installation, Configuration & Bug Fixing support from our experts.
© 2017 SprintERP Technologies. All Rights Reserved.
Please log in to comment on this module