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.

14 lines
434 B

  1. from odoo import models, fields, api
  2. class SurveySurvey(models.Model):
  3. _inherit = 'survey.survey'
  4. @api.model
  5. def next_page(self, user_input, page_id, go_back=False):
  6. res = super(SurveySurvey, self).next_page(user_input, page_id, go_back)
  7. if not user_input.date_start and page_id == 0:
  8. user_input.write({
  9. 'date_start': fields.Datetime.now(),
  10. })
  11. return res