Skip to Content
Menu
This question has been flagged
1 Reply
2793 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?

Thanks

Avatar
Discard
Best Answer

Example: HRIS Module

'hr.overtime.application' object

py file:    hr_overtime_application.py
method: approve_all()

Custom module:

my_module.py

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 :)



Avatar
Discard
Author

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

Posted :)

Author

will check this soon. Thanks.

Related Posts Replies Views Activity
1
Mar 15
3903
0
Mar 15
3287
0
Mar 24
322
0
Jan 24
183
0
Dec 23
397