Use round_up method
This commit is contained in:
parent
2058c660c0
commit
c43afb7c59
2 changed files with 11 additions and 5 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue