I want to print employee details from hr.employee model to my qweb report(Purchase Requisition).
I am trying the code like following:
<tr> <td style="border:1px solid #000;padding-left:5px">Department:<span t-esc="o.user_id.partner_id.department_id.name"/></td> <td style="border:1px solid #000;padding-left:5px"> </td></tr>
And facing this error: Error to render compiling AST AttributeError: 'res.partner' object has no attribute 'department_id'
I understood that my current object does'nt contain department_id field. Then how can I get this employee details from hr.employee model for the logged in user??
Any help is highly appreciated and I am using odoo 10. Thanks!