why we use 'from odoo.tools import float_is_zero' in odoo12?
please help
Thanks in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
why we use 'from odoo.tools import float_is_zero' in odoo12?
please help
Thanks in advance
If you need to check if a float value is equal to zero it is recommended to use the method float_is_zero. This method accepts float value as required argument and two additional arguments: “precision_digits” and “precision_rounding”. Important thing is that precision must be given by “precision_digits” or “precision_rounding“, not both. It returns True if the given value is 0 at the given precision.