DEV Community

Jeevachaithanyan Sivanandan
Jeevachaithanyan Sivanandan

Posted on

pycharm / odoo debugger tips

Odoo / pycharm debugger tips :

  1. run a for loop in debugger console
    [x.name for x in ids] - if you have a collection of ids

  2. output two attributes
    [x.id, x.name for x in ids]

  3. get context - self.env.context

  4. get allowed company ids - self.env.context.get('allowed_company_ids')

  5. get current active company - self.env.user.company_id

Top comments (0)