vendor_payment_diff_amount/CHANGELOG.md

56 lines
2.7 KiB
Markdown

# Changelog
## Version 2.1.0 (2025-12-12)
### Fixed
- **Amount Calculation Issue**: Fixed issue where payment amounts were incorrectly synchronized from journal entries
- Amount field now correctly shows the original payment amount (before deductions)
- Final Payment Amount field now correctly shows the amount after deductions
- Added protection against incorrect amount synchronization for posted payments
### Added
- **Fix Amount Button**: Added "Fix Amount" button on payment form for quick correction of incorrect amounts
- **Fix Wizard**: Added wizard accessible from Accounting > Configuration > Fix Payment Amounts
- **Automatic Detection**: System automatically detects payments with incorrect amounts
- **Debug Logging**: Added logging to help troubleshoot synchronization issues
- **Fix Script**: Added standalone Python script for batch fixing of payment amounts
### Improved
- **Synchronization Logic**: Enhanced `_synchronize_from_moves` method to handle deductions correctly
- **Write Method**: Added write method override to prevent incorrect amount changes
- **Error Handling**: Better error handling for edge cases with expense accounts
### Technical Changes
- Added `write()` method override to prevent amount field changes for posted payments with deductions
- Enhanced `_synchronize_from_moves()` method with better error handling and amount restoration
- Added `action_fix_amount_calculation()` method for individual payment fixes
- Added `fix_all_payment_amounts()` model method for batch fixes
- Added debug logging throughout the synchronization process
### Files Added
- `wizard/payment_amount_fix_wizard.py` - Wizard for fixing payment amounts
- `wizard/payment_amount_fix_wizard_views.xml` - Wizard UI
- `fix_amount_issue.py` - Standalone fix script
- `AMOUNT_FIX_GUIDE.md` - Comprehensive fix guide
- `CHANGELOG.md` - This changelog
### Files Modified
- `models/account_payment.py` - Enhanced synchronization and added fix methods
- `views/account_payment_views.xml` - Added fix button
- `security/ir.model.access.csv` - Added wizard access rights
- `__manifest__.py` - Updated version and added wizard views
- `__init__.py` - Added wizard import
## Version 2.0.0 (Previous)
### Fixed
- **Partner ID Issue**: Fixed "Missing required account on accountable line" error
- **Journal Entry Structure**: Corrected partner_id assignment on journal entry lines
### Added
- **Account Domain Filtering**: Prevented selection of wrong account types for deductions
- **Validation Rules**: Added comprehensive validation for deduction accounts and amounts
### Improved
- **Documentation**: Added comprehensive scenarios and troubleshooting guides
- **Error Messages**: Better error messages and validation feedback