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.

20 lines
554 B

2 years ago
  1. # -*- coding: utf-8 -*-
  2. from odoo import models, fields
  3. TYPES = [
  4. ("free_text", "Multiple Lines Text Box"),
  5. ("textbox", "Single Line Text Box"),
  6. ("numerical_box", "Numerical Value"),
  7. # ('date', 'Date'),
  8. ("dropdown", "Dropdown"),
  9. ("checkbox", "Checkbox"),
  10. ]
  11. class SurveyLabel(models.Model):
  12. _inherit = "survey.label"
  13. type = fields.Selection(
  14. selection=TYPES, string="Type of question", default="checkbox", required=True
  15. )
  16. value_ids = fields.Many2many(comodel_name="survey.label.value", string="Values")