Odoo Help


how to read the value of a previous rule from another rule in payslip?

Pablo Manuel Rizzo
on 12/12/13, 7:02 PM 1,104 views

I know I can read the sum of all the rules in one category, like this

result = categories.CAT1+ categories.CAT2

But how do you read something like this?

result = rules.RUL1 + rules.RUL2
Mike Telahun
On 12/13/13, 1:46 AM

This behaviour is a little counter-intuitive. While you can get the cumulative value of rule categories from the categories dictionary, the rules dictionary contains only the hr.salary.rule objects themselves. To get the computed value of a rule you have to reference it directly by code:

result = RUL1 + RUL2

It works. Thanks!

Naltu, Pablo Manuel Rizzo
on 12/16/13, 2:01 PM

Thanks! This works.

Gaurav Pareek
on 4/29/14, 9:11 PM

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

0 follower(s)


Asked: 12/12/13, 7:02 PM
Seen: 1104 times
Last updated: 3/16/15, 8:10 AM