Use round_up method

This commit is contained in:
PCoder 2020-02-01 13:47:29 +05:30
commit c43afb7c59
2 changed files with 11 additions and 5 deletions

View file

@ -1,5 +1,6 @@
import decimal
import logging
import math
import subprocess
from oca.pool import WrongIdError
@ -214,6 +215,11 @@ def get_ip_addresses(vm_id):
return "--"
def round_up(n, decimals=0):
multiplier = 10 ** decimals
return math.ceil(n * multiplier) / multiplier
class HostingUtils:
@staticmethod
def clear_items_from_list(from_list, items_list):