Odoo Help


How to modify the _get_payslip_lines() method in report_contribution_register.py?

Pascal Tremblay
on 1/20/16, 5:46 PM 943 views

Hello all,

I'm still not able to modify the _get_payslip_lines() method of the file report_contribution_register.py in my own module.

I want to add a line to this method.

How to inherit (override) this method in my own module?


Samantha Cruz
On 1/20/16, 10:06 PM

Example: HRIS Module

'hr.overtime.application' object

py file:    hr_overtime_application.py
method: approve_all()

Custom module:


class hr_overtime_application(orm.Model):

_inherit = 'hr.overtime.application'

     def approve_all(self, cr, uid, ids, context=None): #same method name
         res = super(hr_overtime_application, self).approve_all(cr, uid, ids, context)
         #add the line

         return res

Hope it will help you :)

I would need an example please miss. Thank for your answer

Pascal Tremblay
on 1/20/16, 10:32 PM

Posted :)

Samantha Cruz
on 1/21/16, 6:47 PM

will check this soon. Thanks.

Pascal Tremblay
on 1/29/16, 8:09 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/20/16, 5:46 PM
Seen: 943 times
Last updated: 1/20/16, 10:06 PM