March 2018
Beginner to intermediate
336 pages
8h 22m
English
Let's see what a simple debugging session looks like. We can start by adding a debugger breakpoint in the first line of the do_populate_tasks wizard method:
def do_populate_tasks(self):
import pdb; pdb.set_trace()
self.ensure_one()
# ...
Now, restart the server, open a To-do Tasks Wizard form, and click on the Get All button. This will trigger the do_populate_tasks wizard method on the server, and the web client will stay in a Loading… state, waiting for the server's response. Looking at the Terminal window where the server is running, you will see something similar to this:
> /home/daniel/odoo-dev/custom-addons/todo_stage/models/todo_wizard_model.py(54)do_populate_tasks() -> self.ensure_one() (Pdb)
This is the ...
Read now
Unlock full access