This feature focuses on customizing and streamlining the process of importing ASN files. By enabling mapping between import columns and stock-related fields, users can easily handle ASN files from different vendors and update stock data efficiently.
Key Functionalities:
- ASN Format Configuration:
- Define custom ASN formats using the asn.format model.
- Map import columns to stock-related fields dynamically using format.mapping.
- File Import Utility:
- Upload ASN files in .xlsx format for processing.
- Validate file headers to ensure proper structure (minimum 11 columns required).
- Automatically match import columns to fields based on the defined mappings for the selected vendor and format.
- Dynamic Field Mapping:
- Map fields using dot-separated paths, allowing users to specify relational fields.
- Automatically resolve and create Many2one relations if records do not exist.
- Error Handling:
- Validate mapping and field paths to prevent errors during import.
- Provide detailed error messages for invalid field paths or missing configurations.
- Stock Move Line Creation:
- Generate stock.move.line records dynamically based on the imported data.
- Update transfer receipts with accurate information from the ASN file.
- Integration with Stock Picking:
- Trigger the import process directly from the stock.picking form using the "Import ASN" action.
Key Benefits:
Flexibility: Support for custom ASN formats and mapping configurations tailored to different vendors.
Automation: Automates the creation of stock move lines, reducing manual intervention.
Error Prevention: Validates mapping and file structure to ensure data consistency and accuracy.
Efficiency: Speeds up the process of updating transfer receipts with ASN data.
Scalability: Handles complex field paths and relational mappings seamlessly.
Example Use Case:
A logistics manager receives an ASN file from a supplier and uploads it via the "Import ASN" action in Odoo. The system uses the pre-configured mappings to match import columns to stock move fields, automatically updating the transfer receipt with accurate information. This ensures timely processing of incoming shipments without manual errors.
ASN Import