-1

I want to use salary rule in python code for some calculations. Anyone please tell me how can I do it? Thanks in Advance.

M Tahir Noor
  • 443
  • 2
  • 10
  • 31

1 Answers1

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