Comment 10 for bug 900861

Revision history for this message
Carlos Matos Villar (carlosmvillar19) wrote :

The Bug is fixed... I could do it in this way!!
def onchange_remaining_seats(self,cr,uid,ids,seats,attendee_ids):
  res = {
   'value':{
    'remaining_seats_percent': self._get_remaining_seats_percent(seats,attendee_ids),
      }
    }
  if seats < 0:
   res['warning'] = {
      'title': _('Warning'),
      'message': _('You cannot have negative seats'),
      }

  return res