İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
1330 Görünümler

I'm troubleshooting an issue in Odoo's Accounting module and need to track the exact SQL queries executed when creating, modifying, or posting invoices, journal entries, and payments.

  • How can I enable logging to capture these queries?
  • Are there specific settings or modules in Odoo that allow SQL debugging for accounting-related transactions?
  • Can PostgreSQL logs or Odoo's built-in logging be configured to filter only queries related to the account.move and account.move.line tables?

I'm using Odoo 16.0 on Odoo.sh. 

Any advice on the best approach to capture and analyze these SQL queries would be appreciated!

Avatar
Vazgeç

very usefull @ray Carnes

En İyi Yanıt

1) Connect to a STAGING branch of Odoo.sh (where you can modify the configuration file to trigger logging)

  • this step just ensures there are active Workers started

2) Connect to the Terminal via the SHELL tab, and start nano (a text editor) and open the Odoo configuration file:

nano ./.config/odoo/odoo.conf


3) Cursor down in the file and add the following two lines:

log_level=debug_sql

log_handler=odoo.addons.account:DEBUG


4) Use CTRL-O and ENTER to save the changes, then CTRL-X to exit


5) Restart Odoo:

odoosh-restart http


6) Open the logfile

lnav ~/logs/odoo.log


7) Review it while using Odoo, potentially using timestamps to quickly locate the place where Odoo is responding to what you are doing in the UI and logging the SQL:


You can also review the log files via the LOGS tab if that's easier

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Mar 15
4433
0
Eyl 22
6564
1
Şub 18
10479
1
Nis 25
14259
4
Mar 21
6401