Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
Community Apps Dependencies | Show |
Lines of code | 3827 |
Technical Name |
mhj_account_reports |
License | AGPL-3 |
Website | https://hajjaj.pro |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
•
Invoicing (account)
• Discuss (mail) |
Community Apps Dependencies | Show |
Lines of code | 3827 |
Technical Name |
mhj_account_reports |
License | AGPL-3 |
Website | https://hajjaj.pro |

Hajjaj.Pro Accounting Financial Reports
This module provides comprehensive financial reports for Odoo, with advanced performance optimizations for handling millions of journal items. It also supports professional Excel (XLSX) export for major accounting reports.
Installation
- Download the module and add it to your Odoo addons folder.
- Log on to your Odoo server and go to the Apps menu.
- Trigger debug mode and update the list by clicking on the "Update Apps List" link.
- Install the module by clicking on the install button.
Upgrade
- Download the module and add it to your Odoo addons folder.
- Restart the server and log on to your Odoo server.
- Select the Apps menu and upgrade the module by clicking on the upgrade button.
Features
Financial Reports
- General Ledger
- Partner Ledger With Invoice line details
- Trial Balance
- Journal Audit
- Tax Report
- Aged Partner Balance
- Profit and Loss
- Balance Sheet
Excel Export
This module supports Excel (XLSX) export for major accounting reports alongside the existing PDF reports.
Supported Reports
- General Ledger: Export detailed account movements with running balances
- Partner Ledger: Export partner-wise account movements and balances
- Trial Balance: Export account summaries with debit/credit totals
Excel Export Features
- Professional formatting: Headers, borders, number formatting
- Multiple worksheets: Each report type gets its own formatted worksheet
- Automatic column sizing: Optimal widths for data readability
- Summary totals: Account and partner subtotals with grand totals
- Date formatting: Proper date display in Excel format
- Currency formatting: Numbers formatted with proper decimal places
How to Use Excel Export
- Install the
report_xlsx
module in your Odoo instance - Install the
xlsxwriter
Python library:
pip install xlsxwriter
- Navigate to Accounting > Reporting
- Select your desired report (General Ledger, Partner Ledger, or Trial Balance)
- Configure your report parameters (date range, journals, etc.)
- Click "Export Excel" instead of "Print PDF"
- The Excel file will be automatically downloaded
Report Content
- General Ledger Excel Export
- Report parameters (date range, target moves)
- Account-wise breakdown with:
- Move lines with date, journal, partner, reference
- Debit, credit, and running balance amounts
- Account subtotals
- Partner Ledger Excel Export
- Report parameters and filters
- Partner-wise breakdown with:
- Transaction details by date
- Account information and move references
- Partner balances and totals
- Currency information when applicable
- Trial Balance Excel Export
- Summary of all accounts with:
- Account code and name
- Total debits and credits
- Account balances
- Grand totals
- Summary of all accounts with:
Technical Implementation
- Conditional imports handle environments without
report_xlsx
- Separate Excel report models inherit from
report.report_xlsx.abstract
- Existing report logic is reused for data generation
- Professional Excel formatting with corporate styling
Error Handling
- Graceful degradation when Excel dependencies are missing
- Clear error messages guide users to install required modules
- No impact on existing PDF report functionality
Performance
- Leverages existing optimized report queries
- Memory-efficient processing for large datasets
- Same batching and pagination as PDF reports
Installation Notes
- Ensure
report_xlsx
module is installed and activated - Verify
xlsxwriter
Python library is available - Check module dependencies in
__manifest__.py
- Restart Odoo service after installing dependencies
The Excel export feature is optional - PDF reports continue to work normally even if Excel dependencies are not available.
Performance Optimization Guide
This module has been optimized to handle millions of journal items efficiently while avoiding out-of-memory issues.
Key Performance Improvements
1. Memory Management
- Batch Processing: Reports process data in configurable batches (default: 10,000 records)
- Pagination: Large datasets are paginated to avoid loading all data into memory
- Garbage Collection: Automatic memory cleanup after each batch
- Memory Monitoring: Built-in monitoring to track memory usage during report generation
2. Database Optimizations
- Optimized SQL Queries: Improved JOIN structures and WHERE clauses
- Database Indexing: Automatic creation of performance indexes
- Query Limitations: Configurable limits on records per account/partner
- Batch Account Processing: Accounts processed in batches to control memory
3. Configuration Options
- Enable Pagination: Toggle pagination on/off (recommended: ON for large datasets)
- Max Records per Account: Limit journal entries per account (default: 50,000)
- Batch Size: Number of records processed per batch (default: 10,000)
Memory Monitoring Example
INFO: Memory monitoring started. Initial memory: 256.34 MB INFO: Memory check (Before processing accounts): 512.67 MB INFO: Garbage collection freed 1247 objects, memory: 512.67 -> 387.23 MB INFO: Memory Summary - Initial: 256.34 MB, Peak: 512.67 MB, Final: 387.23 MB
Automatic Optimizations
- Create performance database indexes
- Update table statistics
- Monitor database health
Credits
Contributors
- Hajjaj.Pro <odooapps@hajjaj.pro>
Author & Maintainer
This module is maintained by Hajjaj.Pro
Sponsors
Sponsored by mtjr.cloud
Please log in to comment on this module