Odoo Help


How to fix incorrect GROSS computation on payslip?

on 10/1/15, 11:32 AM 598 views

For the following salary rules these are example values that result in a GROSS amount for which the computed salary was incorrect:

Code BASIC, Category BASIC

result = inputs.quantity.amount * contract.wage = 38.25 * 17.51 = 669.76

Code: OT2, Category: ALW

result = inputs.OT2.amount * contract.wage * 2 = 10.75 * 17.51 * 2 = 376.47


result = categories.BASIC + categories.ALW = 1046.22

Expected result for GROSS is: 669.76 + 376.47 = 1046.23

It seems as if Odoo is finding gross by recomputing both the BASIC and OT2, summing the full amounts and then truncating to two decimal places:

(38.25 * 17.51) + (10.75 * 17.51 * 2) = 1046.2225

which truncates to 1046.22

This is a more precise result but when these values are shown on the payslip it will appear incorrect.

Could this be an error in my configuration or is this the current behavior of Odoo?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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

1 follower(s)


Asked: 10/1/15, 11:32 AM
Seen: 598 times
Last updated: 10/1/15, 11:38 AM