OdooWiki OCA HUB

Sale Margin Security

sale_margin_security folder_open OCA/margin-analysis open_in_new
Sales License: AGPL-3

This module lets you limit who can see or edit sale margin data within sale orders.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Restricts who can see sale margin information in sale orders and sales analysis. Only users with the product cost security group can view margin, margin percentage, and purchase price fields.

This module adds access control to margin-related data in sales. It works together with the sale_margin and product_cost_security modules.

  • On sale orders, the margin and margin percentage fields are only visible to users who belong to the product cost security group. The same restriction applies to the margin label and field in the sale order form view.
  • On sale order lines, the margin, margin percentage, and purchase price fields are also restricted to that group.
  • In the sales analysis report, the margin field is hidden from users without the group.

No new menus or screens are added. The module simply changes the visibility of existing fields. Users without the required group will not see these fields at all, while users with the group will see them as usual. This helps protect sensitive cost and margin information from unauthorized users.

Depends on

Required by other modules

Models and fields (3)
  • sale.order · new modelmargin, margin_percent
  • sale.report · new modelmargin
  • sale.order.line · new modelmargin, margin_percent, purchase_price

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 8 confirmed, 1 with no information of 9 versions.

Sources · Odoo 19.0

Confirmed on 2026-11-03 in branch 19.0 of OCA/margin-analysis.

terminal Installation and usage

OCA documentation · Odoo 19.0

This module will be auto-installed if these others are installed too:

  • product_cost_security from OCA/product-attribute.
  • sale_margin from Odoo CE.

Follow configuration instructions for module product_cost_security.

Afterwards configuring, the product cost security rules will be applied to sale orders. Only authorized users will be able to see or edit sale margin and product cost data from within sale orders.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.