code: def write(self, vals):
          
          if 'isroom' in vals and vals['isroom'] is False:
              vals.update({'color': 2, 'status': 'occupied'})
          if 'isroom'in vals and vals['isroom'] is True:
              vals.update({'color': 5, 'status': 'available'})
          ret_val = super(HotelRoom, self).write(vals)
          return ret_val
docs: Overrides orm write method.
          @param self: The object pointer
          @param vals: dictionary of fields value.