Skip to content

Conversation

@maxhe2014
Copy link

@maxhe2014 maxhe2014 commented Jan 8, 2026

Summary

This enhancement improves the MRP Sale Info module by:

🔧 Technical Improvements

  • Field Computation: Changed from related to compute fields for better flexibility
  • Data Migration: Added post-installation hook for existing data compatibility
  • Search Enhancement: Extended _name_search to support customer reference search

🖥️ UI Extensions

  • Stock Picking Integration: Added sale information to stock picking views
  • Multiple View Types: Extended tree, form, search, and kanban views
  • Permission Control: Added group-based visibility for sensitive information

📊 Data Handling

  • Three-Level Lookup Strategy:
    1. Existing procurement groups
    2. Finished product move chain
    3. Raw material move chain
  • Batch Processing: Efficient data migration for existing records

🧪 Testing

  • Maintained backward compatibility
  • Enhanced test coverage for new functionality

Technical Details

  • Models Enhanced: mrp.production, mrp.workorder, stock.rule
  • New Views: stock_picking.xml with multiple view types
  • Hook Added: mrp_sale_info_post_init_hook for data migration
  • OCA Compliance: All comments and documentation in English

Benefits

  1. Better Data Integrity: Ensures all manufacturing orders have correct sale links
  2. Enhanced User Experience: Sale information available in stock operations
  3. Improved Performance: Batch processing for large datasets
  4. Future-Proof: Flexible computation methods for complex scenarios

Max He added 7 commits January 8, 2026 08:39
Field Calculation Method Optimization: Transition from simple related fields to more flexible computed fields
Data Compatibility: Added initialization hooks to ensure existing data can correctly associate sales information
Search Function Expansion: Supports searching for manufacturing orders by customer reference
Interface Expansion: Add sales information display to the inventory transfer module
Technical Implementation Improvement
Data search logic: Implements a three-tier search strategy (procurement group → finished product movement → raw material movement)
Batch processing: Initialize hooks to utilize batch processing for improved performance
View Integration: Expanded support for multiple view types (tree, form, search, dashboard)
Enhancing business value
Data Integrity: Ensure all manufacturing orders are correctly linked to sales information
User Experience: Sales-related information can also be viewed in the inventory transfer interface
Search efficiency: Supports more search criteria to enhance operational efficiency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant