| __pycache__ | ||
| data | ||
| models | ||
| security | ||
| tests | ||
| views | ||
| __init__.py | ||
| __manifest__.py | ||
| .gitignore | ||
| README.md | ||
Stock Inventory Backdate
Overview
This module allows you to create backdated inventory adjustments with a specific date and time. Unlike the standard Odoo inventory adjustment, this module creates stock moves with the exact backdated datetime you specify.
Features
- Dedicated Backdated Adjustment Form: Separate interface for creating backdated inventory adjustments
- Historical Inventory Position: View the theoretical inventory quantity at the backdated time
- Full Datetime Support: Specify both date and time for the adjustment
- Proper Backdating: All related records (stock moves, move lines, valuation layers, and account moves) are backdated correctly
- Multi-line Support: Adjust multiple products in a single backdated adjustment
- Lot/Serial Number Support: Handle products with lot/serial number tracking
- Package & Owner Support: Support for advanced tracking features
Usage
Creating a Backdated Inventory Adjustment
- Go to Inventory > Operations > Backdated Adjustments
- Click Create
- Set the Adjustment Date & Time to the desired backdate
- Select the Location where you want to adjust inventory
Option A: Load All Products 5. Click Load Products to automatically load all products with inventory at that location
- The system will calculate the theoretical quantity at the backdated time for each product
- Adjust the Counted Quantity for each product as needed
- The Difference column shows what will be adjusted
- Click Validate to create the backdated stock moves
Option B: Add Individual Products 5. In the Inventory Lines tab, click Add a line 6. Select the Product you want to adjust
- The system will automatically calculate the Theoretical Quantity at the backdated time
- Enter the Counted Quantity
- The Difference is calculated automatically
- Add more products as needed
- Click Validate to create the backdated stock moves
Technical Details
How It Works
- When you validate a backdated adjustment, the module creates standard stock moves
- After the moves are processed, it updates the dates via SQL to ensure proper backdating:
- Stock move
datefield - Stock move line
datefield - Stock valuation layer
create_datefield - Account move
datefield (if real-time valuation is enabled)
- Stock move
Models
- stock.inventory.backdate: Main model for backdated adjustments
- stock.inventory.backdate.line: Individual product lines in the adjustment
Security
- Stock Users can create, read, update, and delete backdated adjustments
- Stock Managers have full access
Version History
Version 17.0.2.0.0
- Complete redesign with dedicated backdated adjustment form
- Proper backdating of all related records
- Historical inventory position calculation
- Support for lot/serial numbers, packages, and owners
Version 17.0.1.1.0
- Changed fields from Date to Datetime
- Added time support to inventory adjustments
Version 17.0.1.0.0
- Initial release
- Basic backdating functionality
Author
Suherdy Yacob
License
AGPL-3