Skip to Content
Catalog / PRO · Products & Inventory / Ac Product Cost
Ac Product Cost
ac_product_cost

Ac Product Cost

Hide product cost, average cost and value fields from users who aren't authorized

v19.0.0.0 Abdelfatah Mohammad (AlshayebCo) Products & Inventory

Inherits product template and product product to override _get_view, injecting the groups='ac_product_cost.group_ac_product_cost_user' attribute onto the standard_price (and avg_cost / total_value on variants) nodes at render time. A complementary view inheritance adds the same group to the standard_price label. Security is an Odoo 19 res groups privilege ('Product Cost', category Sales) plus a res groups group_ac_product_cost_user that implies base group_user. No new models, fields, menus or actions; depends only on product.

Overview

Product cost, average cost and inventory value are sensitive figures that should not be visible to every employee who can open a product. This module adds a dedicated 'Show Product Cost' security group and hides the cost-related fields on both product template and product variant forms from anyone outside that group. Administrators simply grant the group to the staff who legitimately need cost visibility, keeping margins and valuations private from the rest of the team.

Key Features

  • Adds a dedicated 'Show Product Cost' security group that gates visibility of cost data.
  • Hides the standard Cost (standard_price) field and label on the product template form from unauthorized users.
  • Hides Cost, Average Cost and Total Value fields on the product variant form from unauthorized users.
  • Enforces the restriction dynamically at view-render time so it applies wherever the cost fields appear.
  • Lets administrators grant cost visibility per user from the standard Users access-rights screen.
  • Requires no configuration beyond assigning the group, and leaves cost data fully intact for authorized staff.

Technical Details

Technical Name ac_product_cost
Version 19.0.0.0
License LGPL-3
Domain PRO · Products & Inventory

Security

Defines a single 'Show Product Cost' access group under the Sales privilege category. Members can see product cost, average cost and total value fields; all other internal users have those fields hidden from the product forms. The group implies the base internal-user group.

Show Product Cost — grants visibility of product cost, average cost and total value fields

Dependencies

product