Skip to Content
Menu
You need to be registered to interact with the community.
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
Opusti

Did you get any solution?

Related Posts Odgovori Prikazi Aktivnost
0
jan. 20
2885
1
jan. 19
4561
1
jun. 20
4152
0
maj 20
2376
2
dec. 19
4133