Browse Source

[IMP-REF]

12.0
RemiFr82 2 years ago
parent
commit
c48f5334f2
  1. 3
      README.md
  2. 8
      survey_custom_matrix/__manifest__.py
  3. 13
      survey_custom_matrix/i18n/fr.po
  4. 182
      survey_custom_matrix/i18n/survey_custom_matrix.pot
  5. 2
      survey_custom_matrix/models/survey_label.py
  6. 17
      survey_custom_matrix/models/survey_question.py
  7. 5
      survey_custom_matrix/views/survey_question.xml
  8. 7
      survey_deadline_autoclose/__manifest__.py
  9. 2
      survey_deadline_autoclose/data/ir_cron.xml
  10. 4
      survey_deadline_autoclose/data/mail_message_subtype.xml
  11. 62
      survey_deadline_autoclose/i18n/fr.po
  12. 74
      survey_deadline_autoclose/i18n/survey_deadline_autoclose.pot
  13. 10
      survey_deadline_autoclose/models/survey_survey.py
  14. 6
      survey_description/__manifest__.py
  15. 18
      survey_description/i18n/fr.po
  16. 37
      survey_description/i18n/survey_description.pot
  17. 4
      survey_description/views/survey_survey.xml
  18. 8
      survey_input_attachment/__manifest__.py
  19. 62
      survey_input_attachment/i18n/fr.po
  20. 139
      survey_input_attachment/i18n/survey_attachment.pot
  21. 8
      survey_input_dates/__manifest__.py
  22. 30
      survey_input_dates/i18n/fr.po
  23. 48
      survey_input_dates/i18n/survey_input_dates.pot
  24. 19
      survey_input_dates/models/survey_user_input.py
  25. 9
      survey_input_dates/views/survey_user_input.xml
  26. 8
      survey_input_odoo_debrand/__manifest__.py
  27. 10
      survey_input_template_custom/__manifest__.py
  28. 151
      survey_input_template_custom/i18n/fr.po
  29. 114
      survey_input_template_custom/i18n/survey_input_template_custom.pot
  30. 96
      survey_input_template_custom/models/survey_survey.py
  31. 2
      survey_input_template_custom/views/survey_survey.xml
  32. 8
      survey_link_input_ratio/__manifest__.py
  33. 9
      survey_link_input_ratio/i18n/fr.po
  34. 57
      survey_link_input_ratio/i18n/survey_link_input_ratio.pot
  35. 33
      survey_link_input_ratio/models/survey_survey.py
  36. 2
      survey_link_input_ratio/views/survey_survey.xml
  37. 0
      survey_page_duplicate/__init__.py
  38. 39
      survey_page_duplicate/__manifest__.py
  39. 22
      survey_page_duplicate/i18n/fr.po
  40. 16
      survey_page_duplicate/views/survey_survey.xml
  41. 9
      survey_partner_input/__manifest__.py
  42. 20
      survey_partner_input/i18n/fr.po
  43. 56
      survey_partner_input/i18n/survey_partner_input.pot
  44. 4
      survey_partner_input/views/survey_user_input.xml
  45. 8
      survey_question_duplicate/__manifest__.py
  46. 22
      survey_question_duplicate/i18n/fr.po
  47. 4
      survey_question_duplicate/views/survey_page.xml
  48. 8
      survey_select_input/__manifest__.py
  49. 52
      survey_select_input/i18n/survey_select_input.pot
  50. 25
      survey_select_input/models/survey_survey.py
  51. 8
      survey_select_input/models/survey_user_input.py
  52. 8
      survey_template/__manifest__.py
  53. 41
      survey_template/i18n/fr.po
  54. 126
      survey_template/i18n/survey_template.pot
  55. 42
      survey_template/models/survey_survey.py
  56. 15
      survey_template/views/survey_survey.xml

3
README.md

@ -1,3 +0,0 @@
# sudokeys-survey-addons
Modules étendant les fonctionnalités des sondages développés par SUDOKEYS.

8
survey_custom_matrix/__manifest__.py

@ -4,11 +4,13 @@
"name": "Survey Custom Matrix",
"version": "1.0.0",
"summary": """
This app allows handling of complex survey forms with options like multiple choice questions, custom matrix etc.
Customize matrix response fields type
""",
"description": """
This module adds a new type \"Custom\" for matrix questions that allows to ask for answer types different from radio button or checkbox in the matrix grid.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

13
survey_custom_matrix/i18n/fr.po

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-11-09 12:08+0000\n"
"PO-Revision-Date: 2020-11-09 12:08+0000\n"
"POT-Creation-Date: 2023-03-02 17:50+0000\n"
"PO-Revision-Date: 2023-03-02 17:50+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -27,8 +27,8 @@ msgstr "Réponses"
#. module: survey_custom_matrix
#: selection:survey.user_input_line,answer_type:0
msgid "Attachment"
msgstr "Pièce jointe"
msgid "Attachment (img/pdf)"
msgstr "Pièce jointe (img/pdf)"
#. module: survey_custom_matrix
#: selection:survey.label,type:0
@ -53,7 +53,7 @@ msgstr "Matrice personnalisée"
#. module: survey_custom_matrix
#: selection:survey.user_input_line,answer_type:0
msgid "Date"
msgstr ""
msgstr "Date"
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label_value__display_name
@ -180,3 +180,4 @@ msgstr "Valeur"
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label__value_ids
msgid "Values"
msgstr "Valeurs"

182
survey_custom_matrix/i18n/survey_custom_matrix.pot

@ -1,182 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_custom_matrix
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-11-09 12:09+0000\n"
"PO-Revision-Date: 2020-11-09 12:09+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_user_input_line__answer_type
msgid "Answer Type"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.actions.report,name:survey_custom_matrix.action_view_pdf_answers
msgid "Answers"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.user_input_line,answer_type:0
msgid "Attachment"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.label,type:0
msgid "Checkbox"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label_value__create_uid
msgid "Created by"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label_value__create_date
msgid "Created on"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.question,matrix_subtype:0
msgid "Custom Matrix"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.user_input_line,answer_type:0
msgid "Date"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label_value__display_name
msgid "Display Name"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.label,type:0
msgid "Dropdown"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.user_input_line,answer_type:0
msgid "Free Text"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label_value__id
msgid "ID"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label_value____last_update
msgid "Last Modified on"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label_value__write_uid
msgid "Last Updated by"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label_value__write_date
msgid "Last Updated on"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_question__matrix_subtype
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_user_input_line__matrix_subtype
msgid "Matrix Type"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.label,type:0
msgid "Multiple Lines Text Box"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.question,matrix_subtype:0
msgid "Multiple choices per row"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label_value__name
msgid "Name"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.user_input_line,answer_type:0
msgid "Number"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.label,type:0
msgid "Numerical Value"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.question,matrix_subtype:0
msgid "One choice per row"
msgstr ""
#. module: survey_custom_matrix
#: model_terms:ir.ui.view,arch_db:survey_custom_matrix.survey_user_input_form
msgid "Print PDF Answers"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.label,type:0
msgid "Single Line Text Box"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.user_input_line,answer_type:0
msgid "Suggestion"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model,name:survey_custom_matrix.model_survey_label
msgid "Survey Label"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model,name:survey_custom_matrix.model_survey_question
msgid "Survey Question"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model,name:survey_custom_matrix.model_survey_user_input_line
msgid "Survey User Input Line"
msgstr ""
#. module: survey_custom_matrix
#: selection:survey.user_input_line,answer_type:0
msgid "Text"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label__type
msgid "Type of question"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model,name:survey_custom_matrix.model_survey_label_value
msgid "Value"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_user_input_line__value_id
msgid "Value Dropdown"
msgstr ""
#. module: survey_custom_matrix
#: model:ir.model.fields,field_description:survey_custom_matrix.field_survey_label__value_ids
msgid "Values"
msgstr ""

2
survey_custom_matrix/models/survey_label.py

@ -15,6 +15,6 @@ class SurveyLabel(models.Model):
_inherit = "survey.label"
type = fields.Selection(
selection=TYPES, string="Type of question", default="checkbox"
selection=TYPES, string="Type of question", default="checkbox", required=True
)
value_ids = fields.Many2many(comodel_name="survey.label.value", string="Values")

17
survey_custom_matrix/models/survey_question.py

@ -6,7 +6,22 @@ from odoo.addons.survey.models.survey import dict_keys_startswith
class SurveyQuestion(models.Model):
_inherit = "survey.question"
matrix_subtype = fields.Selection(selection_add=[("custom", "Custom Matrix")])
matrix_subtype = fields.Selection(
selection_add=[("custom", "Custom Matrix")],
required=True,
)
@api.onchange("matrix_subtype")
def onchange_matrix_subtype(self):
self.ensure_one()
if self.matrix_subtype != "custom":
labels = self.labels_ids
labels.filtered(
lambda label: label.type not in ["checkbox", "dropdown"]
).update({"type": "checkbox"})
labels.filtered(lambda label: label.type == "dropdown").update(
{"type": "checkbox", "value_ids": [(5)]}
)
@api.multi
def validate_matrix(self, post, answer_tag):

5
survey_custom_matrix/views/survey_question.xml

@ -7,8 +7,9 @@
<field name="inherit_id" ref="survey.survey_question_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook//page//field[@name='labels_ids']//tree" position="inside">
<field name="type"/>
<field name="value_ids" widget="many2many_tags" attrs="{'invisible': [('type', '!=', 'dropdown')]}"/>
<field name="type" attrs="{'column_invisible': [('parent.matrix_subtype','!=','custom')]}"/>
<field name="value_ids" widget="many2many_tags"
attrs="{'column_invisible': [('parent.matrix_subtype','!=','custom')], 'invisible': [('type', '!=', 'dropdown')]}"/>
</xpath>
</field>
</record>

7
survey_deadline_autoclose/__manifest__.py

@ -4,11 +4,12 @@
"name": "Auto-close survey on deadline",
"version": "1.0.0",
"summary": """
The module adds a deadline date on surveys and a checkbox to automatically close them with a planned action.
Deadline date on surveys and auto-close option
""",
"description": """ """,
"description": """
This module adds a deadline date on surveys and a checkbox to automatically close them with a planned action.""",
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

2
survey_deadline_autoclose/data/ir_cron.xml

@ -7,7 +7,7 @@
<field name="name">Close expired surveys</field>
<field name="model_id" ref="survey.model_survey_survey"/>
<field name="state">code</field>
<field name="code">model.with_context(cron=True).close_deadline_survey()</field>
<field name="code">model.with_context(cron=True).cron_close_deadline_survey()</field>
<field name="active" eval="True"/>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>

4
survey_deadline_autoclose/data/mail_message_subtype.xml

@ -7,6 +7,7 @@
<field name="res_model">survey.survey</field>
<field name="default" eval="True"/>
<field name="hidden" eval="False"/>
<field name='internal' eval="True"/>
<field name="description">This survey has expired.</field>
</record>
@ -15,7 +16,8 @@
<field name="res_model">survey.survey</field>
<field name="default" eval="True"/>
<field name="hidden" eval="False"/>
<field name="description">This survey was closed.</field>
<field name='internal' eval="True"/>
<field name="description">This survey is closed.</field>
</record>
</data>

62
survey_deadline_autoclose/i18n/fr.po

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-23 10:23+0000\n"
"PO-Revision-Date: 2020-03-23 10:23+0000\n"
"POT-Creation-Date: 2023-02-28 18:13+0000\n"
"PO-Revision-Date: 2023-02-28 18:13+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -20,6 +20,11 @@ msgstr ""
msgid "Auto close"
msgstr "Clôture automatique"
#. module: survey_deadline_autoclose
#: model:mail.message.subtype,description:survey_deadline_autoclose.mail_message_subtype_survey_closed
msgid "This survey is closed."
msgstr "Ce sondage est clôturé."
#. module: survey_deadline_autoclose
#: model:ir.actions.server,name:survey_deadline_autoclose.cron_close_expired_surveys_ir_actions_server
#: model:ir.cron,cron_name:survey_deadline_autoclose.cron_close_expired_surveys
@ -30,7 +35,7 @@ msgstr "Clôture des sondages arrivés à échéance"
#. module: survey_deadline_autoclose
#: model_terms:ir.ui.view,arch_db:survey_deadline_autoclose.survey_survey_form
msgid "Close survey"
msgstr "Clore ce sondage"
msgstr "Clôturer ce sondage"
#. module: survey_deadline_autoclose
#: model:mail.message.subtype,name:survey_deadline_autoclose.mail_message_subtype_survey_closed
@ -40,23 +45,40 @@ msgstr "Sondage clos"
#. module: survey_deadline_autoclose
#: model:ir.model.fields,field_description:survey_deadline_autoclose.field_survey_survey__date_deadline
msgid "Deadline"
msgstr "Date limite"
msgstr "Echéance"
#. module: survey_deadline_autoclose
#: model_terms:ir.ui.view,arch_db:survey_deadline_autoclose.survey_survey_kanban
msgid "Expiration :"
msgstr "Échéance :"
#. module: survey_deadline_autoclose
#: model_terms:ir.ui.view,arch_db:survey_deadline_autoclose.survey_survey_search
msgid "Expiration month"
msgstr "Mois d'échéance"
#. module: survey_deadline_autoclose
#: model:mail.message.subtype,name:survey_deadline_autoclose.mail_message_subtype_survey_expired
msgid "Expired survey"
msgstr "Sondage expiré"
#. module: survey_deadline_autoclose
#: code:addons/survey_deadline_autoclose/models/survey_survey.py:38
#: model_terms:ir.ui.view,arch_db:survey_deadline_autoclose.survey_survey_search
msgid "Group By"
msgstr "Regrouper par"
#. module: survey_deadline_autoclose
#: model:ir.model.fields,help:survey_deadline_autoclose.field_survey_survey__auto_close
msgid "If checked, the survey will be automatically closed when deadline is overpassed."
msgstr "Si coché, ce sondage sera automatiquement clôturé lorsque la date d'échéance sera dépassée."
#. module: survey_deadline_autoclose
#: code:addons/survey_deadline_autoclose/models/survey_survey.py:65
#, python-format
msgid "No \"closed\" status found, the requested operation is impossible."
msgstr "Aucun statut qualifié de \"fermé\" n'a été trouvé, l'opération demandée est impossible."
msgid "No \"closed\" stage found, the requested operation is impossible.\n"
"To fix this situation, you have to check \"Closed\" at least on one survey stage."
msgstr "Aucune étape \"Fermé\" trouvée, l'opération demandée est impossible.\n"
"Pour régler ce problème, vous devez cocher \"Fermé\" sur au moins une étape."
#. module: survey_deadline_autoclose
#: model:ir.model,name:survey_deadline_autoclose.model_survey_survey
@ -64,11 +86,29 @@ msgid "Survey"
msgstr "Sondage"
#. module: survey_deadline_autoclose
#: code:addons/survey_deadline_autoclose/models/survey_survey.py:56
#, python-format
msgid "Survey closing impossible"
msgstr "Clôture du sondage impossible"
#. module: survey_deadline_autoclose
#: code:addons/survey_deadline_autoclose/models/survey_survey.py:57
#, python-format
msgid "Survey should have been automatically closed but no \"closed\" stage was found, the requested operation was impossible to proceed.\n"
"To fix this situation, you have to check \"Closed\" at least on one survey stage."
msgstr "Ce sondage aurait dû être clôturé automatiquement mais aucune étape \"Fermé\" n'a été trouvée, l'opération demandée est impossible.\n"
"Pour régler ce problème, vous devez cocher \"Fermée\" sur au moins une étape."
#. module: survey_deadline_autoclose
#: code:addons/survey_deadline_autoclose/models/survey_survey.py:22
#: model:mail.message.subtype,description:survey_deadline_autoclose.mail_message_subtype_survey_expired
#, python-format
msgid "This survey has expired."
msgstr "Ce sondage est arrivé à échéance."
#. module: survey_deadline_autoclose
#: model:mail.message.subtype,description:survey_deadline_autoclose.mail_message_subtype_survey_closed
msgid "This survey was closed."
msgstr "Ce sondage a été clôturé."
#: code:addons/survey_deadline_autoclose/models/survey_survey.py:75
#, python-format
msgid "This survey was automatically closed."
msgstr "Ce sondage a été clôturé automatiquement."

74
survey_deadline_autoclose/i18n/survey_deadline_autoclose.pot

@ -1,74 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_deadline_autoclose
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-23 10:25+0000\n"
"PO-Revision-Date: 2020-03-23 10:25+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_deadline_autoclose
#: model:ir.model.fields,field_description:survey_deadline_autoclose.field_survey_survey__auto_close
msgid "Auto close"
msgstr ""
#. module: survey_deadline_autoclose
#: model:ir.actions.server,name:survey_deadline_autoclose.cron_close_expired_surveys_ir_actions_server
#: model:ir.cron,cron_name:survey_deadline_autoclose.cron_close_expired_surveys
#: model:ir.cron,name:survey_deadline_autoclose.cron_close_expired_surveys
msgid "Close expired surveys"
msgstr ""
#. module: survey_deadline_autoclose
#: model_terms:ir.ui.view,arch_db:survey_deadline_autoclose.survey_survey_form
msgid "Close survey"
msgstr ""
#. module: survey_deadline_autoclose
#: model:mail.message.subtype,name:survey_deadline_autoclose.mail_message_subtype_survey_closed
msgid "Closed survey"
msgstr ""
#. module: survey_deadline_autoclose
#: model:ir.model.fields,field_description:survey_deadline_autoclose.field_survey_survey__date_deadline
msgid "Deadline"
msgstr ""
#. module: survey_deadline_autoclose
#: model_terms:ir.ui.view,arch_db:survey_deadline_autoclose.survey_survey_kanban
msgid "Expiration :"
msgstr ""
#. module: survey_deadline_autoclose
#: model:mail.message.subtype,name:survey_deadline_autoclose.mail_message_subtype_survey_expired
msgid "Expired survey"
msgstr ""
#. module: survey_deadline_autoclose
#: code:addons/survey_deadline_autoclose/models/survey_survey.py:38
#, python-format
msgid "No \"closed\" status found, the requested operation is impossible."
msgstr ""
#. module: survey_deadline_autoclose
#: model:ir.model,name:survey_deadline_autoclose.model_survey_survey
msgid "Survey"
msgstr ""
#. module: survey_deadline_autoclose
#: model:mail.message.subtype,description:survey_deadline_autoclose.mail_message_subtype_survey_expired
msgid "This survey has expired."
msgstr ""
#. module: survey_deadline_autoclose
#: model:mail.message.subtype,description:survey_deadline_autoclose.mail_message_subtype_survey_closed
msgid "This survey was closed."
msgstr ""

10
survey_deadline_autoclose/models/survey_survey.py

@ -18,7 +18,8 @@ class SurveySurvey(models.Model):
to_close.action_close_survey()
for survey in deadline - to_close:
survey.message_post(
subtype="survey_deadline_autoclose.mail_message_subtype_survey_deadline"
subtype="survey_deadline_autoclose.mail_message_subtype_survey_deadline",
body=_("This survey has expired."),
)
date_deadline = fields.Date(
@ -51,7 +52,7 @@ class SurveySurvey(models.Model):
if self.env.context.get("cron", False):
for survey in self:
survey.message_post(
message_type="comment",
subtype="survey_deadline_autoclose.mail_message_subtype_survey_closed",
subject=_("Survey closing impossible"),
body=_(
'Survey should have been automatically closed but no "closed" '
@ -70,13 +71,14 @@ class SurveySurvey(models.Model):
self.write({"stage_id": stage.id})
for survey in self:
survey.message_post(
subtype="survey_deadline_autoclose.mail_message_subtype_survey_closed"
subtype="survey_deadline_autoclose.mail_message_subtype_survey_closed",
body=_("This survey was automatically closed."),
)
# ONCHANGES
@api.onchange("date_deadline")
def onchange_is_template(self):
def onchange_date_deadline(self):
self.ensure_one()
if not self.date_deadline:
self.auto_close = False

6
survey_description/__manifest__.py

@ -4,11 +4,13 @@
"name": "Survey description",
"version": "1.0.0",
"summary": """
Edit description fields on surveys and pages
""",
"description": """
This module displays standard HTML fields \"Description\" and \"Thank you message\" on survey and survey pages.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

18
survey_description/i18n/fr.po

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-26 00:37+0000\n"
"PO-Revision-Date: 2020-03-26 00:37+0000\n"
"POT-Creation-Date: 2023-02-28 18:18+0000\n"
"PO-Revision-Date: 2023-02-28 18:18+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -20,19 +20,15 @@ msgstr ""
msgid "Description"
msgstr ""
#. module: survey_description
#: model:ir.model,name:survey_description.model_survey_survey
msgid "Survey"
msgstr "Sondage"
#. module: survey_description
#: model_terms:ir.ui.view,arch_db:survey_description.survey_survey_form
msgid "Thank you page"
msgstr "Page de fin"
msgstr "Page de remerciement"
#. module: survey_description
#: model_terms:ir.ui.view,arch_db:survey_description.survey_survey_form
msgid "This content will be displayed between the title of the survey and the \"Start\" button, on the answer homepage.<br/>\n"
" You can also add a custom content on each page of the survey through the \"Description\" field."
" You can also add a custom content on each page of the survey through the \"Description\" field on each page."
msgstr "Ce contenu sera affiché entre le titre du sondage et le bouton \"Commencer\", sur la page d'accueil des réponses aux sondages.<br/>\n"
" Vous pouvez également ajouter du contenu spécifique sur chacune des pages du sondage via le champ \"Description\"."
" Vous pouvez également ajouter du contenu spécifique sur chacune des pages du sondage via le champ \"Description\" de chaque page."

37
survey_description/i18n/survey_description.pot

@ -1,37 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_description
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-25 11:44+0000\n"
"PO-Revision-Date: 2020-03-25 11:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_description
#: model_terms:ir.ui.view,arch_db:survey_description.survey_survey_form
msgid "Description"
msgstr ""
#. module: survey_description
#: model:ir.model,name:survey_description.model_survey_survey
msgid "Survey"
msgstr ""
#. module: survey_description
#: model_terms:ir.ui.view,arch_db:survey_description.survey_survey_form
msgid "Thank you page"
msgstr ""
#. module: survey_description
#: model_terms:ir.ui.view,arch_db:survey_description.survey_survey_form
msgid "This content will be displayed between the title of the survey and the \"Start\" button, on the answer homepage.<br/>\n"
" You can also add a custom content on each page of the survey through the \"Description\" field."
msgstr ""

4
survey_description/views/survey_survey.xml

@ -12,14 +12,14 @@
<group>
<p colspan="2" class="text-muted oe_edit_only">
This content will be displayed between the title of the survey and the "Start" button, on the answer homepage.<br/>
You can also add a custom content on each page of the survey through the "Description" field.
You can also add a custom content on each page of the survey through the "Description" field on each page.
</p>
<field name="description" nolabel="1" colspan="2"/>
</group>
</page>
<page name="thank_you" string="Thank you page">
<group class="o_label_nowrap">
<field name="thank_you_message" colspan="2"/>
<field name="thank_you_message"/>
</group>
</page>
</xpath>

8
survey_input_attachment/__manifest__.py

@ -4,11 +4,13 @@
"name": "Survey input attachment",
"version": "1.0.0",
"summary": """
This module provides a new type of question in surveys, that allows to join a file as answer.
New question type : attachment (img/PDF)
""",
"description": """
This module provides a new type of question in surveys, that allows to join an image or PDF file as answer.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

62
survey_input_attachment/i18n/fr.po

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-31 13:31+0000\n"
"PO-Revision-Date: 2020-03-31 13:31+0000\n"
"POT-Creation-Date: 2023-02-28 18:28+0000\n"
"PO-Revision-Date: 2023-02-28 18:28+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -22,6 +22,7 @@ msgstr "Type de réponse"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:10
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:10
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
@ -30,11 +31,12 @@ msgstr "Pièce jointe (img/pdf)"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:9
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:8
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Date"
msgstr "Date"
msgstr ""
#. module: survey_input_attachment
#: model_terms:ir.ui.view,arch_db:survey_input_attachment.upload_file
@ -47,21 +49,22 @@ msgid "File type"
msgstr "Type de fichier"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:8
#: selection:survey.user_input_line,file_type:0
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:9
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Image"
msgstr "Image"
msgid "Free Text"
msgstr "Texte libre"
#. module: survey_input_attachment
#: model:ir.model.fields,field_description:survey_input_attachment.field_survey_question__question_attachment
msgid "Joined attachment"
msgstr "Pièce jointe"
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:15
#: selection:survey.user_input_line,file_type:0
#, python-format
msgid "Image"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:13
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Matrix"
msgstr "Matrice"
@ -69,7 +72,6 @@ msgstr "Matrice"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:6
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Multiple Lines Text Box"
msgstr "Plusieurs lignes de champ de texte"
@ -77,7 +79,6 @@ msgstr "Plusieurs lignes de champ de texte"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:12
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Multiple choice: multiple answers allowed"
msgstr "Choix multiples : réponses multiples"
@ -85,21 +86,26 @@ msgstr "Choix multiples : réponses multiples"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:11
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Multiple choice: only one answer"
msgstr "Choix multiples : une seule réponse possible"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:7
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Number"
msgstr "Nombre"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:8
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Numerical Value"
msgstr "Valeur numérique"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:9
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:16
#: selection:survey.user_input_line,file_type:0
#, python-format
msgid "PDF file"
@ -108,11 +114,17 @@ msgstr "Fichier PDF"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:7
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Single Line Text Box"
msgstr "Ligne de texte unique"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:11
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Suggestion"
msgstr ""
#. module: survey_input_attachment
#: model:ir.model,name:survey_input_attachment.model_survey_question
msgid "Survey Question"
@ -123,6 +135,19 @@ msgstr "Question du sondage"
msgid "Survey User Input Line"
msgstr "Ligne de saisie pour l'utilisateur du sondage"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:6
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Text"
msgstr "Texte"
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:37
#, python-format
msgid "The file you joined is not an image nor a PDF file."
msgstr "Le fichier joint doit être une image ou un fichier PDF."
#. module: survey_input_attachment
#: model:ir.model.fields,field_description:survey_input_attachment.field_survey_question__type
msgid "Type of Question"
@ -137,3 +162,4 @@ msgstr "Fichier joint"
#: model:ir.model.fields,field_description:survey_input_attachment.field_survey_user_input_line__filename
msgid "Uploaded file name"
msgstr "Nom du fichier joint"

139
survey_input_attachment/i18n/survey_attachment.pot

@ -1,139 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_input_attachment
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-31 13:32+0000\n"
"PO-Revision-Date: 2020-03-31 13:32+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_input_attachment
#: model:ir.model.fields,field_description:survey_input_attachment.field_survey_user_input_line__answer_type
msgid "Answer Type"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:9
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Attachment"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:8
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Date"
msgstr ""
#. module: survey_input_attachment
#: model_terms:ir.ui.view,arch_db:survey_input_attachment.upload_file
msgid "Download"
msgstr ""
#. module: survey_input_attachment
#: model:ir.model.fields,field_description:survey_input_attachment.field_survey_user_input_line__file_type
msgid "File type"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:7
#: selection:survey.user_input_line,file_type:0
#, python-format
msgid "Image"
msgstr ""
#. module: survey_input_attachment
#: model:ir.model.fields,field_description:survey_input_attachment.field_survey_question__question_attachment
msgid "Joined attachment"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:12
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Matrix"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:5
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Multiple Lines Text Box"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:11
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Multiple choice: multiple answers allowed"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:10
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Multiple choice: only one answer"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:7
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Numerical Value"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_user_input_line.py:8
#: selection:survey.user_input_line,file_type:0
#, python-format
msgid "PDF file"
msgstr ""
#. module: survey_input_attachment
#: code:addons/survey_input_attachment/models/survey_question.py:6
#: selection:survey.question,type:0
#: selection:survey.user_input_line,answer_type:0
#, python-format
msgid "Single Line Text Box"
msgstr ""
#. module: survey_input_attachment
#: model:ir.model,name:survey_input_attachment.model_survey_question
msgid "Survey Question"
msgstr ""
#. module: survey_input_attachment
#: model:ir.model,name:survey_input_attachment.model_survey_user_input_line
msgid "Survey User Input Line"
msgstr ""
#. module: survey_input_attachment
#: model:ir.model.fields,field_description:survey_input_attachment.field_survey_question__type
msgid "Type of Question"
msgstr ""
#. module: survey_input_attachment
#: model:ir.model.fields,field_description:survey_input_attachment.field_survey_user_input_line__file
msgid "Uploaded file"
msgstr ""
#. module: survey_input_attachment
#: model:ir.model.fields,field_description:survey_input_attachment.field_survey_user_input_line__filename
msgid "Uploaded file name"
msgstr ""

8
survey_input_dates/__manifest__.py

@ -4,11 +4,13 @@
"name": "Survey input dates",
"version": "1.0.0",
"summary": """
This module adds date start and date done on surveys answers.
Add start and done dates on survey answers
""",
"description": """
This module adds start and done dates on surveys answers, and computes filling duration, readable by human.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

30
survey_input_dates/i18n/fr.po

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-04 13:08+0000\n"
"PO-Revision-Date: 2020-05-04 13:08+0000\n"
"POT-Creation-Date: 2023-02-28 20:38+0000\n"
"PO-Revision-Date: 2023-02-28 20:38+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -22,16 +22,27 @@ msgid "Date done"
msgstr "Réponse terminée le"
#. module: survey_input_dates
#: code:addons/survey_input_dates/models/survey_user_input.py:27
#: model:ir.model.fields,field_description:survey_input_dates.field_survey_user_input__duration
#: model:ir.model.fields,field_description:survey_input_dates.field_survey_user_input__duration_txt
msgid "Duration"
msgstr "Durée"
#. module: survey_input_dates
#: model:ir.model.fields,help:survey_input_dates.field_survey_user_input__duration
msgid "Duration in seconds"
msgstr "Durée en secondes"
#. module: survey_input_dates
#: code:addons/survey_input_dates/models/survey_user_input.py:39
#, python-format
msgid "Not done"
msgstr "Non terminé"
msgid "Not done yet"
msgstr "Pas encore terminé"
#. module: survey_input_dates
#: code:addons/survey_input_dates/models/survey_user_input.py:25
#: code:addons/survey_input_dates/models/survey_user_input.py:36
#, python-format
msgid "Not started"
msgstr "Non commencé"
msgid "Not started yet"
msgstr "Pas encore démarré"
#. module: survey_input_dates
#: model:ir.model.fields,field_description:survey_input_dates.field_survey_user_input__date_start
@ -57,3 +68,4 @@ msgstr "Cette date est renseignée lorsque le répondant clique sur le bouton \"
#: model:ir.model.fields,help:survey_input_dates.field_survey_user_input__date_done
msgid "This date is set when the user input is set ton \"Done\" status."
msgstr "Cette date est renseignée lorsque la réponse passe au statut \"Terminé\"."

48
survey_input_dates/i18n/survey_input_dates.pot

@ -1,48 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_input_dates
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-04 13:08+0000\n"
"PO-Revision-Date: 2020-05-04 13:08+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_input_dates
#: model:ir.model.fields,field_description:survey_input_dates.field_survey_user_input__date_done
#: model_terms:ir.ui.view,arch_db:survey_input_dates.survey_user_input_search
msgid "Date done"
msgstr ""
#. module: survey_input_dates
#: model:ir.model.fields,field_description:survey_input_dates.field_survey_user_input__date_start
msgid "Start date"
msgstr ""
#. module: survey_input_dates
#: model:ir.model,name:survey_input_dates.model_survey_survey
msgid "Survey"
msgstr ""
#. module: survey_input_dates
#: model:ir.model,name:survey_input_dates.model_survey_user_input
msgid "Survey User Input"
msgstr ""
#. module: survey_input_dates
#: model:ir.model.fields,help:survey_input_dates.field_survey_user_input__date_start
msgid "This date is set when the user clicks on \"Start survey\" button for the first time."
msgstr ""
#. module: survey_input_dates
#: model:ir.model.fields,help:survey_input_dates.field_survey_user_input__date_done
msgid "This date is set when the user input is set ton \"Done\" status."
msgstr ""

19
survey_input_dates/models/survey_user_input.py

@ -18,18 +18,31 @@ class SurveyUserInput(models.Model):
string="Duration",
compute="_get_duration",
store=True,
help="Time expressed in seconds, neet 'duration' widget to be read by user.",
help="Duration in seconds",
)
duration_txt = fields.Char(
string="Duration",
compute="_get_duration",
store=True,
)
@api.depends("date_start", "date_stop")
@api.depends("date_start", "date_done")
def _get_duration(self):
for input in self:
start = input.date_start
done = input.date_done
if not start and done:
if not start:
input.duration = 0
input.duration_txt = _("Not started yet")
elif not done:
input.duration = 0
input.duration_txt = _("Not done yet")
else:
input.duration = int((done - start).total_seconds())
input.duration_txt = self.env["ir.qweb.field.duration"].value_to_html(
(done - start).total_seconds(),
{"unit": "second", "round": "second"},
)
@api.multi
def write(self, vals):

9
survey_input_dates/views/survey_user_input.xml

@ -11,7 +11,8 @@
<field name="date_create" position="after">
<field name="date_start"/>
<field name="date_done"/>
<field name="duration" widget="duration" options="{'unit': 'second', 'round': 'second'}"/>
<field name="duration" invisible="1"/>
<field name="duration_txt"/>
</field>
</field>
</record>
@ -26,7 +27,8 @@
<field name="date_create" position="after">
<field name="date_start"/>
<field name="date_done"/>
<field name="duration" widget="duration" options="{'unit': 'minute', 'round': 'minute'}"/>
<field name="duration" invisible="1"/>
<field name="duration_txt"/>
</field>
</field>
</record>
@ -41,7 +43,8 @@
<field name="date_create" position="after">
<field name="date_start"/>
<field name="date_done"/>
<!-- <field name="duration"/> -->
<field name="duration"/>
<field name="duration_txt"/>
</field>
</field>
</record>

8
survey_input_odoo_debrand/__manifest__.py

@ -4,11 +4,13 @@
"name": "Survey input debranding",
"version": "1.0.0",
"summary": """
This module removes the \"Create a free website with odoo\" mention at the bottom right of survey inputs.
Removes Odoo branding from surveys
""",
"description": """
This module removes the \"Create a free website with odoo\" mention at the bottom of survey inputs.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

10
survey_input_template_custom/__manifest__.py

@ -1,14 +1,16 @@
# -*- coding: utf-8 -*-
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Survey input custom",
"name": "Survey input template custom",
"version": "1.0.0",
"summary": """
This module allows to customize the survey start button label and the \"Thank you\" page title.
Customize survey input elements
""",
"description": """
This module allows to customize the survey start and sumbit buttons' labels, the \"Thank you\" page title and the CSS style of input web templates.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

151
survey_input_template_custom/i18n/fr.po

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-18 14:54+0000\n"
"PO-Revision-Date: 2020-08-18 14:54+0000\n"
"POT-Creation-Date: 2023-03-01 12:43+0000\n"
"PO-Revision-Date: 2023-03-01 12:43+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -18,58 +18,116 @@ msgstr ""
#. module: survey_input_template_custom
#: code:addons/survey_input_template_custom/models/survey_survey.py:9
#, python-format
msgid "/* Background (start and thank you) */\n"
"/* .jumbotron {\n"
" background-color: #e9ecef;\n"
"} */\n"
msgid "/* Background frame (start and thank you) */\n"
"// .jumbotron {\n"
"// padding: 2rem 1rem;\n"
"// margin-bottom: 2rem;\n"
"// background-color: #e9ecef;\n"
"// border-radius: 0.3rem;\n"
"// }\n"
"// @media (min-width: 576px) {\n"
"// .jumbotron {\n"
"// padding: 4rem 2rem;\n"
"// }\n"
"// }\n"
"\n"
"/* Titles (survey and pages) */\n"
"/* h1 {} */\n"
"// h1 {\n"
"// font-size: 2.1875rem;\n"
"// font-family: inherit;\n"
"// font-weight: 500;\n"
"// line-height: 1.2;\n"
"// color: inherit;\n"
"// margin-top: 0;\n"
"// margin-bottom: 0.5rem;\n"
"// }\n"
"/* Descriptions (survey and pages) */\n"
"/* p {} */\n"
"// p {\n"
"// margin-top: 0;\n"
"// margin-bottom: 1rem;\n"
"// }\n"
"\n"
"/* Questions (title) */\n"
"/* h2 {} */\n"
"/* Responses labels */\n"
"/* label {} */\n"
"/* Questions titles */\n"
"// h2 {\n"
"// font-size: 1.75rem;\n"
"// font-family: inherit;\n"
"// font-weight: 500;\n"
"// line-height: 1.2;\n"
"// color: inherit;\n"
"// margin-top: 0;\n"
"// margin-bottom: 0.5rem;\n"
"// }\n"
"/* Responses labels (MCQ) */\n"
"// label {\n"
"// margin-bottom: 0.5rem;\n"
"// }\n"
"\n"
"/* Buttons (start, navigate and submit) */\n"
"/* .btn-primary {\n"
" color: #FFFFFF;\n"
" background-color: #00A09D;\n"
" border-color: #00A09D;\n"
"}\n"
".btn-primary:hover {\n"
" color: #FFFFFF;\n"
" background-color: #007a77;\n"
" border-color: #006d6b;\n"
"} */"
msgstr "/* Arrière-plan (début et fin) */\n"
"/* .jumbotron {\n"
" background-color: #e9ecef;\n"
"} */\n"
"// .btn-primary {\n"
"// color: #FFFFFF;\n"
"// background-color: #00A09D;\n"
"// border-color: #00A09D;\n"
"// }\n"
"// .btn-primary:hover {\n"
"// color: #FFFFFF;\n"
"// background-color: #007a77;\n"
"// border-color: #006d6b;\n"
"// }"
msgstr "/* Arrière plan (accueil et remerciement) */\n"
"// .jumbotron {\n"
"// padding: 2rem 1rem;\n"
"// margin-bottom: 2rem;\n"
"// background-color: #e9ecef;\n"
"// border-radius: 0.3rem;\n"
"// }\n"
"// @media (min-width: 576px) {\n"
"// .jumbotron {\n"
"// padding: 4rem 2rem;\n"
"// }\n"
"// }\n"
"\n"
"/* Titres (sondage et pages) */\n"
"/* h1 {} */\n"
"// h1 {\n"
"// font-size: 2.1875rem;\n"
"// font-family: inherit;\n"
"// font-weight: 500;\n"
"// line-height: 1.2;\n"
"// color: inherit;\n"
"// margin-top: 0;\n"
"// margin-bottom: 0.5rem;\n"
"// }\n"
"/* Descriptions (sondage et pages) */\n"
"/* p {} */\n"
"// p {\n"
"// margin-top: 0;\n"
"// margin-bottom: 1rem;\n"
"// }\n"
"\n"
"/* Questions (titre) */\n"
"/* h2 {} */\n"
"/* Labels des réponses */\n"
"/* label {} */\n"
"/* Titres des questions */\n"
"// h2 {\n"
"// font-size: 1.75rem;\n"
"// font-family: inherit;\n"
"// font-weight: 500;\n"
"// line-height: 1.2;\n"
"// color: inherit;\n"
"// margin-top: 0;\n"
"// margin-bottom: 0.5rem;\n"
"// }\n"
"/* Labels des réponses (QCM) */\n"
"// label {\n"
"// margin-bottom: 0.5rem;\n"
"// }\n"
"\n"
"/* Boutons (début, navigation et soumission) */\n"
"/* .btn-primary {\n"
" color: #FFFFFF;\n"
" background-color: #00A09D;\n"
" border-color: #00A09D;\n"
"}\n"
".btn-primary:hover {\n"
" color: #FFFFFF;\n"
" background-color: #007a77;\n"
" border-color: #006d6b;\n"
"} */"
"/* Boutons (Commencer, naviguer et soumettre) */\n"
"// .btn-primary {\n"
"// color: #FFFFFF;\n"
"// background-color: #00A09D;\n"
"// border-color: #00A09D;\n"
"// }\n"
"// .btn-primary:hover {\n"
"// color: #FFFFFF;\n"
"// background-color: #007a77;\n"
"// border-color: #006d6b;\n"
"// }"
#. module: survey_input_template_custom
#: model_terms:ir.ui.view,arch_db:survey_input_template_custom.survey_survey_form
@ -97,12 +155,12 @@ msgstr "Commencer le sondage"
#. module: survey_input_template_custom
#: model:ir.model.fields,field_description:survey_input_template_custom.field_survey_survey__start_btn_label
msgid "Start button label"
msgstr "Bouton \"Commencer\""
msgstr "Label du bouton \"Commencer\""
#. module: survey_input_template_custom
#: model:ir.model.fields,field_description:survey_input_template_custom.field_survey_survey__submit_btn_label
msgid "Submit button label"
msgstr "Bouton \"Soumettre\""
msgstr "Label du bouton \"Soumettre\""
#. module: survey_input_template_custom
#: model_terms:ir.ui.view,arch_db:survey_input_template_custom.page
@ -138,3 +196,4 @@ msgstr "Ce label sera utilisé dans le bouton pour soumettre la réponse. Si ce
#: model:ir.model.fields,help:survey_input_template_custom.field_survey_survey__thank_you_title
msgid "This title will be used in the survey \"Thank you\" page. If empty, the label will be \"Thank you !\"."
msgstr "Ce titre sera utilisé dans la page de fin de la réponse d'un sondé. Si ce champ est vide, le titre sera \"Merci !\"."

114
survey_input_template_custom/i18n/survey_input_template_custom.pot

@ -1,114 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_input_template_custom
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-18 14:53+0000\n"
"PO-Revision-Date: 2020-08-18 14:53+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_input_template_custom
#: code:addons/survey_input_template_custom/models/survey_survey.py:9
#, python-format
msgid "/* Background (start and thank you) */\n"
"/* .jumbotron {\n"
" background-color: #e9ecef;\n"
"} */\n"
"\n"
"/* Titles (survey and pages) */\n"
"/* h1 {} */\n"
"/* Descriptions (survey and pages) */\n"
"/* p {} */\n"
"\n"
"/* Questions (title) */\n"
"/* h2 {} */\n"
"/* Responses labels */\n"
"/* label {} */\n"
"\n"
"/* Buttons (start, navigate and submit) */\n"
"/* .btn-primary {\n"
" color: #FFFFFF;\n"
" background-color: #00A09D;\n"
" border-color: #00A09D;\n"
"} */\n"
"/* .btn-primary:hover {\n"
" color: #FFFFFF;\n"
" background-color: #007a77;\n"
" border-color: #006d6b;\n"
"} */"
msgstr ""
#. module: survey_input_template_custom
#: model_terms:ir.ui.view,arch_db:survey_input_template_custom.survey_survey_form
msgid "<i class=\"fa fa-exclamation-triangle text-warning\"/>\n"
" This SCSS stylesheet will be injected in the layout of user response to a survey. Be sure of what you do when you decide to modify this field."
msgstr ""
#. module: survey_input_template_custom
#: model_terms:ir.ui.view,arch_db:survey_input_template_custom.survey_survey_form
msgid "Page title"
msgstr ""
#. module: survey_input_template_custom
#: model:ir.model.fields,field_description:survey_input_template_custom.field_survey_survey__scss_style
#: model_terms:ir.ui.view,arch_db:survey_input_template_custom.survey_survey_form
msgid "SCSS style"
msgstr ""
#. module: survey_input_template_custom
#: model_terms:ir.ui.view,arch_db:survey_input_template_custom.survey_init
msgid "Start Survey"
msgstr ""
#. module: survey_input_template_custom
#: model:ir.model.fields,field_description:survey_input_template_custom.field_survey_survey__start_btn_label
msgid "Start button label"
msgstr ""
#. module: survey_input_template_custom
#: model:ir.model.fields,field_description:survey_input_template_custom.field_survey_survey__submit_btn_label
msgid "Submit button label"
msgstr ""
#. module: survey_input_template_custom
#: model_terms:ir.ui.view,arch_db:survey_input_template_custom.page
msgid "Submit survey"
msgstr ""
#. module: survey_input_template_custom
#: model:ir.model,name:survey_input_template_custom.model_survey_survey
msgid "Survey"
msgstr ""
#. module: survey_input_template_custom
#: model:ir.model.fields,field_description:survey_input_template_custom.field_survey_survey__thank_you_title
msgid "Thank you page title"
msgstr ""
#. module: survey_input_template_custom
#: model_terms:ir.ui.view,arch_db:survey_input_template_custom.sfinished
msgid "Thank you!"
msgstr ""
#. module: survey_input_template_custom
#: model:ir.model.fields,help:survey_input_template_custom.field_survey_survey__start_btn_label
msgid "This label will be used in the survey start button. If empty, the label will be \"Start survey\"."
msgstr ""
#. module: survey_input_template_custom
#: model:ir.model.fields,help:survey_input_template_custom.field_survey_survey__submit_btn_label
msgid "This label will be used in the survey submit button. If empty, the label will be \"Submit survey\"."
msgstr ""
#. module: survey_input_template_custom
#: model:ir.model.fields,help:survey_input_template_custom.field_survey_survey__thank_you_title
msgid "This title will be used in the survey \"Thank you\" page. If empty, the label will be \"Thank you !\"."
msgstr ""

96
survey_input_template_custom/models/survey_survey.py

@ -2,41 +2,83 @@ from odoo import models, fields, api, _
class SurveySurvey(models.Model):
_inherit = 'survey.survey'
_inherit = "survey.survey"
@api.model
def _get_default_style(self):
return _("""/* Background (start and thank you) */
/* .jumbotron {
background-color: #e9ecef;
} */
return _(
"""/* Background frame (start and thank you) */
// .jumbotron {
// padding: 2rem 1rem;
// margin-bottom: 2rem;
// background-color: #e9ecef;
// border-radius: 0.3rem;
// }
// @media (min-width: 576px) {
// .jumbotron {
// padding: 4rem 2rem;
// }
// }
/* Titles (survey and pages) */
/* h1 {} */
// h1 {
// font-size: 2.1875rem;
// font-family: inherit;
// font-weight: 500;
// line-height: 1.2;
// color: inherit;
// margin-top: 0;
// margin-bottom: 0.5rem;
// }
/* Descriptions (survey and pages) */
/* p {} */
// p {
// margin-top: 0;
// margin-bottom: 1rem;
/