Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
5 Відповіді
29260 Переглядів

I'm trying to modify an invoice template to my needs, but I'm having a hard time figuring out what I can work with. I've found some people saying to include the following in my template

<t t-debug="pdb"></t>

But where do I view the debug results?

Also, is there any good reference on how inherited views works with regards to QWeb? Seems like it is necessary in order to get data from other forms.

Thanks

Аватар
Відмінити
Найкраща відповідь

Hi Michael
<t t-debug="pdb"></t>
will stop execution if debugging is active (exact condition depend on the browser and its development tools)

so go to the template where you have defined debug point and turn on the debugging (dev tools on chrome) and reload the page

hope it helps

thank you 

Аватар
Відмінити
Найкраща відповідь

For odoo14:

1.-Put this ,on the line you want to stop, in the xml file.

<t t-debug="pdb"∕>

2.- Run the server:

python3  ./odoo/odoo-bin -c /etc/odoo14.conf --dev=qweb

3.- Look at the terminal, when you launch the corresponding qweb template. The debugger will stop the program where you put the tag from step 1.

4.- If you want to see the variables type in the terminal:

locals()




Аватар
Відмінити
Найкраща відповідь

The Breakpoint only works when the Server is started with the command line argument --dev=qweb 

Аватар
Відмінити
Найкраща відповідь

Essentially the expected behaviour is that the server would breaks and debugging would be possible from the shell from whence you ran the server.  The debug directive doesnt seem to work on qweb reports too. 

Аватар
Відмінити
Найкраща відповідь

try locals()

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
3
вер. 23
20908
1
бер. 21
4796
2
жовт. 20
12854
1
лист. 17
9631
3
лип. 17
15274