OdooWiki OCA HUB

Product Cost Security

product_cost_security folder_open OCA/product-attribute open_in_new
Product License: AGPL-3

It adds two security groups, one for viewing the product cost price, and the other for editing it.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Adds two permission levels for product costs: one group to see the cost price and another to change it. Users without the right group no longer see or edit cost fields on products.

This module protects the product cost price (standard_price) on both product.template and product.product with two new access groups under a "Product costs" privilege: "Read" lets a user see the cost, and "Edit" lets a user change it. The "Edit" group automatically includes the "Read" group, so anyone who can edit costs can also see them.

  • Users who are not in the "Read" group do not see the cost price field on the product form; the field is hidden by the security group applied to the product form view.
  • Users who can see the cost but are not in the "Edit" group get the cost field shown as read-only, and any attempt to write to it is blocked with an access error message telling them to contact their system administrator.
  • A computed flag user_can_update_cost tells the interface whether the current user is allowed to change costs, and the field metadata is adjusted so the cost appears read-only when editing is not allowed.
  • The protection is applied through a reusable mixin (product.cost.security.mixin) that other modules can inherit to secure their own cost-related fields.

The module only touches the product area: the product form view and the cost price fields on product templates and product variants. It does not add menus, reports, or scheduled actions.

Depends on

product
Models and fields (3)
  • product.product · new modelstandard_price
  • product.template · new modelstandard_price
  • product.cost.security.mixin · new modeluser_can_update_cost

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/product-attribute.

terminal Installation and usage

OCA documentation · Odoo 19.0

To use this module you need to:

  • Go to a Setting \> Users and Companies \> Users.
  • Edit a user.
  • Grant some access level using the Product costs dropdown.

To use this module you need to:

  • Go to product form view.
  • You will not see the Cost field unless you follow the Configuration steps and get read permissions.
  • You will not be able to edit it unless you are granted write permissions.

No verified information in OCA: Installation.

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.