Repository
OCA/product-attribute · module folder · Try on Runboat
Module version
1.1.0
Category
Product
Folder size
0.07 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/product-attribute
Last tracking update
2026-08-07 08:42:54
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Carlos Lopez, emtz10, Weblate, OCA-git-bot, oca-ci
Odoo dependencies
odoo/odoo:
- web
- bus
- uom
Python dependencies
None
System dependencies
None
Required by
pos_product_cost_security, product_cost_security_stock_account, product_standard_margin_security, sale_margin_security
Description
It adds two security groups, one for viewing the product cost price, and
the other for editing it.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
product_product_tree_view product.product tree Inherits product.product_product_tree_view
product_template_form_view product.template form Inherits product.product_template_form_view
product_template_tree_view product.template tree Inherits product.product_template_tree_view
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (3)

New fields (1)
  • user_can_update_cost Boolean
    compute='_compute_user_can_update_cost'
Public methods (2)
  • check_field_access_rights(self, operation, fields)
    @api.model
    Forbid users from updating product costs if they have no permissions. The field's `groups` attribute restricts always R/W access. We apply an extra protection to prevent only editing if the user is not in the `product_cost_security.group_product_edit_cost` group.
  • fields_get(self, allfields=None, attributes=None)
    @api.model
    Make product cost fields readonly for non-editors.

New fields (1)
  • standard_price Float
    groups='product_cost_security.group_product_cost'
Public methods (0)

No public methods.

New fields (1)
  • standard_price Float
    groups='product_cost_security.group_product_cost'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
checks failing
Open since
228 days ago
Last activity
1 day ago
Repository
OCA/product-attribute
Pull request
[19.0][MIG] product_cost_security: Migration to 19.0 (#2176)