Browse Source

[ADD] track_visibility on fields

12.0
Rémi FRANÇOIS 5 years ago
parent
commit
6ea19eb373
  1. 4
      survey_deadline_autoclose/models/survey_survey.py
  2. 4
      survey_input_template_custom/models/survey_survey.py

4
survey_deadline_autoclose/models/survey_survey.py

@ -17,8 +17,8 @@ class SurveySurvey(models.Model):
for survey in deadline - to_close: for survey in deadline - to_close:
survey.message_post(subtype='survey_deadline_autoclose.mail_message_subtype_survey_deadline') survey.message_post(subtype='survey_deadline_autoclose.mail_message_subtype_survey_deadline')
date_deadline = fields.Date(string="Deadline", copy=False)
auto_close = fields.Boolean(string="Auto close", default=False, help="If checked, the survey will be closed automatically when deadline is overpassed.")
date_deadline = fields.Date(string="Deadline", copy=False, track_visibility='onchange')
auto_close = fields.Boolean(string="Auto close", default=False, help="If checked, the survey will be closed automatically when deadline is overpassed.", track_visibility='onchange')
# ACTIONS # ACTIONS

4
survey_input_template_custom/models/survey_survey.py

@ -4,9 +4,9 @@ from odoo import models, fields
class SurveySurvey(models.Model): class SurveySurvey(models.Model):
_inherit = 'survey.survey' _inherit = 'survey.survey'
start_btn_label = fields.Char(string="Start button label",
start_btn_label = fields.Char(string="Start button label", track_visibility='onchange',
help="This label will be used in the survey start button. If empty, the label will be \"Start survey\".") help="This label will be used in the survey start button. If empty, the label will be \"Start survey\".")
submit_btn_label = fields.Char(string="Submit button label",
submit_btn_label = fields.Char(string="Submit button label", track_visibility='onchange',
help="This label will be used in the survey submit button. If empty, the label will be \"Submit survey\".") help="This label will be used in the survey submit button. If empty, the label will be \"Submit survey\".")
thank_you_title = fields.Char(string="Thank you page title", thank_you_title = fields.Char(string="Thank you page title",
help="This title will be used in the survey \"Thank you\" page. If empty, the label will be \"Thank you !\".") help="This title will be used in the survey \"Thank you\" page. If empty, the label will be \"Thank you !\".")
Loading…
Cancel
Save