33 lines
1.7 KiB
Markdown
33 lines
1.7 KiB
Markdown
# 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
|
|
1. Navigate to **Inventory > Products > Products**.
|
|
2. Open the product form for the product you wish to modify.
|
|
3. Click on the **Actions** (gear icon) menu.
|
|
4. Select **Change UOM**.
|
|
5. 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.
|
|
6. 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.template` directly via SQL to avoid the `write` method constraint check in `stock` module.
|