Skip to Content
मेन्यू
This question has been flagged

I want to call my function for salary rule, but getting error like "Wrong python code defined for salary rule"

My python code in 'hr.payslip' model is:

@api.multi
def _get_project_split(self, project):
    for line in self.all_project_hours:
        if line.project_id.name == project:
            project_split = line.project_split
    return project_split

And my salary rule python code is for example:

result = payslip.env['hr.payslip']._get_project_split('API')

'API' is my project name.

Any help is appreciated

Avatar
Discard

Did you get any solution?

Related Posts Replies Views Activity
0
जन॰ 20
2883
1
जन॰ 19
4529
1
जून 20
4146
0
मई 20
2374
2
दिस॰ 19
4131