Hi everyone,
I am working on customizing the General Ledger report in Odoo 18, and I would like to add three custom fields coming from account.move:
I already created these fields in the account.move model:
Now my goal is to display these fields inside the General Ledger report, ideally at the transaction (account.move.line) level.
What I tried:
- I inherited the account.general.ledger.report.handler
- I explored _get_query_amls() and _dynamic_lines_generator()
- I attempted to extend the SQL query to include values from account.move
However:
- The fields are not appearing in the report UI
- Sometimes I get errors when modifying the query
My Questions:
- What is the correct way to join account_move fields into the GL report SQL query?
Where exactly should I add these fields:
- _get_query_amls()?
- _get_query_sums()?
- How do I properly add new columns to the report options and UI?
- Do I also need to modify the XML view or only Python?