I am am trying to get a float field to round up to next number in Odoo 10. I am calcuating the room width by room lenght
@api.onchange('roomwidth')
def _onchange_roll_required(self):
self.rolls_required = (self.roomwidth or 1) / (self.carpet_width or 1)
The carpet width is 6 so a 13x9 room works out at 2.17. I need this 2.17 to be 3 so I need to round up to next number. I have used the below for 3 digits but never rounded up
rolls_required = fields.Float("Rolls Required",digits=(12,3))