Odoo modules related to surveys
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
364 B

  1. from odoo import models, fields, api
  2. class SurveyUserInput(models.Model):
  3. _inherit = 'survey.user_input'
  4. selected = fields.Boolean(string="Selected", default=False)
  5. @api.multi
  6. def toggle_selected(self):
  7. unselect = self.filtered('selected')
  8. unselect.write({'selected': False})
  9. (self - unselect).write({'selected': True})