Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 python 代码中使用工资规则进行一些计算。任何人请告诉我我该怎么做?提前致谢。
如果您对您的规则有所了解,即“名称”,您可以尝试以下操作:
def _get_salary_rule(self): rule = self.env['hr.salary.rule'].search([('name', '=', 'SALARY_RULE_NAME')]) return rule