Skip to main content

Hide Sales Margins

Purpose​

Hide Sales Margins limits selected margin and purchase-cost displays to a Margin Manager group. It changes the sales order margin area, purchase-price fields in order lines, line-form margin and margin percentage, and the Sales analysis margin field.

The scope matters: most order and line restrictions are applied to the supplied views. This is not a universal data-security restriction for all cost or margin fields, exports, APIs, custom reports or other installed addons.

Before you start​

Install eis_hide_margin only for the reviewed Odoo 18.0 series with native Sales Margins (sale_margin). No Enterprise-only dependency is declared. Use an installation that permits server addons.

This guide is based on source inspection and has not been validated with live user accounts. An administrator should review the access implications before assigning the new group: the package includes a permissive sales-order record rule for Margin Manager members, which can broaden the orders visible to them subject to other applicable rules.

Access and roles​

The added group is Margin Manager, under Show Margin. The module initially adds Odoo's root and administrator users. It does not automatically equate every Sales Manager with Margin Manager.

Group membership controls the affected views and the model-level restriction on the Sales analysis margin field. Existing Sales permissions still apply. The module does not add equivalent model-level group restrictions to every sale order or order line margin/cost field.

Have an administrator assess the user's intended order scope as well as their need to see margins. Do not assign this group solely as a cosmetic display preference.

Setup and menu​

There is no dedicated margin application menu. An administrator locates Margin Manager in the user/group configuration; technical group navigation can depend on the native settings interface and developer mode. Test the intended group membership before rolling it out to ordinary staff.

The visible business changes are on the existing quotation/sales order forms and Sales analysis. They depend on the native sale_margin views being present and on other view customizations retaining those sections.

Workflow​

  1. In an authorized test database, prepare two users with the appropriate normal Sales permissions and equivalent intended order scope.
  2. After reviewing the record-rule effect, have an administrator give Margin Manager to the account intended to inspect margins. Keep the comparison user outside that group.
  3. Open the same permitted quotation under each account. Compare the order margin area and line purchase-price fields.
  4. Open a line's detailed form and compare its margin and margin percentage. The installed view restrictions should hide these controls for the account without Margin Manager.
  5. Inspect Sales analysis under the intended reporting account. Its margin field has a model-level group restriction as well as the form-level changes elsewhere.
  6. Check that each account still sees only the orders it should. Review any custom report, export or integration separately if the business requires broader confidentiality controls.

Practice scenario​

Use a fictional “Harbor Wholesale” quotation and test accounts “Sales Desk” and “Margin Reviewer.” Compare the supplied views, then check both users' sales-order lists. The intended display difference is margin visibility for the reviewer; access to additional orders must be assessed independently. This exercise is source-derived and was not executed during this review.

Troubleshooting and limitations​

Margins still appear: check group membership and the actual inherited view in use. Another addon or a custom view may present the fields elsewhere.

A manager cannot see margins: native Sales Manager membership is not itself the addon-specific Margin Manager grant.

The group exposes additional sales orders: the package adds a group-specific permissive order rule. Ask the administrator to assess that behavior before production assignment; hiding a field does not narrow record access.

The addon neither changes margin calculations nor deletes costs. It does not establish complete protection against reading order-line costs through other authorized interfaces.

Only Odoo 18.0 is listed for this module in the supplied inventory. This review does not establish operation on another major version.