I want to use salary rule in python code for some calculations. Anyone please tell me how can I do it? Thanks in Advance.
Asked
Active
Viewed 357 times
-1
-
What are you trying at the time? – Juan Salcedo Dec 19 '18 at 17:43
-
Actually have no idea, how to call a salary rule in any python code method. – M Tahir Noor Dec 21 '18 at 07:10
1 Answers
0
If you know anything about your rule, i.e "name", you can try something like:
def _get_salary_rule(self):
rule = self.env['hr.salary.rule'].search([('name', '=', 'SALARY_RULE_NAME')])
return rule

clxoid
- 2,577
- 12
- 21