1.7 KiB
Product UOM Change
Author: Suherdy Yacob
Version: 18.0.1.0.0
License: LGPL-3
Category: Inventory
Description
This module allows authorized users to change the Unit of Measure (UOM) of a product even if it has existing stock moves, bypassing the standard Odoo restriction.
It enforces that the new UOM must belong to the same UOM Category as the current UOM to maintain data integrity regarding physical quantities.
WARNING: This module uses raw SQL to bypass Odoo's standard validation. While it enforces category consistency, changing UOMs on products with existing stock can lead to inventory valuation and quantity inconsistencies if the conversion factors differ. Use with caution.
Configuration
No specific configuration is required.
Access to the "Change UOM" feature is restricted to users in the Administration / Settings group (base.group_system).
Usage
- Navigate to Inventory > Products > Products.
- Open the product form for the product you wish to modify.
- Click on the Actions (gear icon) menu.
- Select Change UOM.
- In the wizard that appears:
- New UOM: Select the new Unit of Measure. The list is filtered to show only UOMs in the same category.
- New Purchase UOM: (Optional) Select a new UOM for purchasing, if different.
- Click the Change UOM button to apply the changes.
Technical Details
- Model:
product.uom.change.wizard - Access Rights: Wizard access is granted to internal users, but the action is restricted to system administrators.
- Logic: Updates
product.templatedirectly via SQL to avoid thewritemethod constraint check instockmodule.