Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Accounting
  3. TRP Account Reports cached v 16.0
  4. Sales Conditions FAQ

TRP Account Reports cached

by Therp Bv
Odoo

$ 115.61

v 16.0 Third Party
This module requires Odoo Enterprise Edition.
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Accounting (account_accountant)
• Discuss (mail)
Lines of code 764
Technical Name trp_account_reports_cached
LicenseLGPL-3
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Accounting (account_accountant)
• Discuss (mail)
Lines of code 764
Technical Name trp_account_reports_cached
LicenseLGPL-3

TRP Account Reports Cached

Most "slow accounting reports" in Odoo get slow because they keep asking Postgres questions like: "Scan a huge ``account_move_line`` table, apply a bunch of filters/domains, then **GROUP BY* account/date/company/journal/state and compute sums/counts."*" Doing that over and over (and for multiple report lines) is expensive. This module implements caching in account reports by making access faster for workload that is dominated by scanning + grouping huge account_move_line data. A PostgreSQL materialized view stores precomputed aggregates, so the report query can read a much smaller, already-grouped dataset instead of repeatedly aggregating millions of journal items. That's exactly the classic use-case where MVs improve read performance.

Usage

Once the module is installed:

1.) Turn ON the global "Cached Reports" switch:

  • Go to Accounting app → Configuration → Settings (or Settings → Accounting depending on your DB/menu layout)
  • Search for "Cached" / "Enable Cached Reports"
  • Enable it and Save.This should set your ir.config_parameter key trp_account_reports.cache_reports_enabled=True (your code uses that gate).

2.) Open a report and enable "use cache" (per-report option):

  • Go to Accounting → Reporting → Balance Sheet and/or Accounting → Reporting → Trial Balance
  • Open the report's Options/Filters panel
  • Enable your checkbox (the one that maps to options["trp_cache_report"])
  • Run the report / refresh the report
What to check:
  • Results should look normal (same totals as non-cached mode).

3.) Prove the delta trigger works (UI-level):

  • Keep the report open in one tab (cached option ON).
  • In another tab: create a Journal Entry inside the same date range:
    • Accounting → Accounting → Journal Entries → New
    • Add 2 lines (e.g., Expense debit 100, Revenue credit 100)
    • Post it
  • Return to the report and refresh/recompute.

Expected:

  • The report should reflect the change immediately (that's your "delta table + union view" doing its job).

4.) Prove the snapshot refresh works (run the cron manually)

  • With developer mode still enabled, go to: Settings → Technical → Automation → Scheduled Actions
  • Search for your cron (likely something like "Save report snapshot" / the record calling account.report.cron_save_report_snapshot)
  • Open it and click Run Manually (button name can vary slightly, but it's there in the scheduled action form).
  • Reload the report again.

Expected: - The report is still correct.

NB: In the tools folder inside the module, you will see a python script generate_aml_load.py which you can use on a demo database to generate account moves quickly and simulate the report cache functionality. To add the account move lines automatically, execute the command in your terminal as shown on snippet below:

python3 generate_aml_load.py \
  --config /{path_to_your_odoo_config_file}/odoo.conf
  --db {demo_db_name} \
  --aml-target {no_of_acc_moves} # e.g 1500000
  --lines-per-move 40 \
  --batch-moves 200 \
  --accounts-sample 1000 \
  --journals-sample 2 \
  --date {Date e.g 2025-12-31} \
  --date-span-days 365 \
  --ref-prefix {your_prefix_name}

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with