Odoo Help


how to round to the next multiple openerp

on 9/29/14, 7:49 AM 643 views


I want to round totalRemises to the lower multiple

Example: if totalRemises is 1245, I want to round to 1000

// total des remises
            var totalRemises = 0;
            totalRemises = (parseFloat(specialDiscount)/100) * parseFloat(totalDeDepart) ;


Ludo - Neobis

--Ludo - Neobis--
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--


Ludo - Neobis
On 9/29/14, 10:42 AM

Divide the totalRemises by 1000, then use either python's built in floor() or top() function to set it to an integer of 1 or 2. Once that is done, multiply by 1000 again.

Would that help?

On 9/30/14, 9:53 AM

thanks for your help

If my answer helped you and the problem is solved, please mark it as the correct answer. That way this issue will disappear from the active list, cleaning up a little bit.

Ludo - Neobis
on 9/30/14, 10:26 AM

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: 9/29/14, 7:49 AM
Seen: 643 times
Last updated: 3/16/15, 8:10 AM