Community mailing list archives
Custom Qweb Reportby
I am trying to generate a PDF report for Employee's contracts. I was able to pull fields from the hr.contract and hr.employee models. But I am trying to display for example the following things as well, which are not straight forward fields:
- Employee´s age (Calculated from hr.employee.birthday)
- Employee's wage in words (Calculated from hr.contract.wage)
- - - 125 = One hundred and twenty five
- and other fields...
I know I need to do my own functions for this and call them from my Qweb template.
My question is which approach should I use,
- Create a parse class, as depicted here OR
- Create a custom report, as depicted here
If you know of any other method, or a better example I can follow. I will be very grateful if you are willing to share it.
Hope you can give a push towards the right direction. Greetings!