콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
1472 화면

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!

아바타
취소

very usefull @ray Carnes

베스트 답변

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

아바타
취소
관련 게시물 답글 화면 활동
0
3월 15
4579
0
9월 22
6639
1
2월 18
10601
1
4월 25
14379
4
3월 21
6507