Odoo Help


How to use rules object inside python code of payroll salary rules

on 3/12/16, 8:22 PM 1,614 views

Hello all,

I read that rules object can be used inside python calculation of salary rules . If I undestand correctly, with that object I can get any rule value (i.e. its total ) already calculated for the employee during the calculation process in execution, and use it in current salary rule calculation for the same employee. If thas is correct, can anybody indicate the way rules object should be? ( I already know how to get a category current value that has been calculated for an employee during the process, but my point is wheter it is possible to get a specific previosly calculated value for a salary rule of the employee)

I appreciate your response.

Bernard Kipkorir Too
On 6/18/16, 12:12 AM

use the code of the rule, for example of the rule name is 'pension contribution' and code is 'PENS' then you can simply put it as shown in example below:

result = categories.BASIC - PENS

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

3 follower(s)


Asked: 3/12/16, 8:22 PM
Seen: 1614 times
Last updated: 10/14/16, 5:17 AM