pycharm / odoo debugger tips

Jeevachaithanyan Sivanandan - Dec 6 '23 - - Dev Community

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

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player