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;
// }
/* Questions (title) */
/* h2 {} */
/* Responses labels */
/* label {} */
/* Questions titles */
// h2 {
// font-size: 1.75rem;
// font-family: inherit;
// font-weight: 500;
// line-height: 1.2;
// color: inherit;
// margin-top: 0;
// margin-bottom: 0.5rem;
// }
/* Responses labels (MCQ) */
// label {
// margin-bottom: 0.5rem;
// }
/* Buttons (start, navigate and submit) */
/* .btn-primary {
color: #FFFFFF;
background-color: #00A09D;
border-color: #00A09D;
}
.btn-primary:hover {
color: #FFFFFF;
background-color: #007a77;
border-color: #006d6b;
} */""")
// .btn-primary {
// color: #FFFFFF;
// background-color: #00A09D;
// border-color: #00A09D;
// }
// .btn-primary:hover {
// color: #FFFFFF;
// background-color: #007a77;
// border-color: #006d6b;
// }"""
)
scss_style = fields.Text(string="SCSS style", default=_get_default_style)
start_btn_label = fields.Char(string="Start button label", translate=True, track_visibility='onchange',
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", translate=True, track_visibility='onchange',
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", translate=True,
help="This title will be used in the survey \"Thank you\" page. If empty, the label will be \"Thank you !\".")
start_btn_label = fields.Char(
string="Start button label",
translate=True,
track_visibility="onchange",
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",
translate=True,
track_visibility="onchange",
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",
translate=True,
help='This title will be used in the survey "Thank you" page. If empty, the label will be "Thank you !".',
)

2
survey_input_template_custom/views/survey_survey.xml

@ -11,7 +11,7 @@
<field name="thank_you_title" string="Page title"/>
</field>
<xpath expr="//notebook/page[descendant::field[@name='users_can_go_back']]" position="inside">
<group col="4">
<group col="4" class="o_label_nowrap">
<field name="start_btn_label"/>
<field name="submit_btn_label"/>
</group>

8
survey_link_input_ratio/__manifest__.py

@ -4,11 +4,13 @@
"name": "Survey sent answer ratio",
"version": "1.0.0",
"summary": """
This module displays percent pies statistics on sent inputs in survey form stat-buttons.
Private links statistics on surveys
""",
"description": """
This module displays percent pies for started and completed statistics about inputs sent by private link in survey form stat-buttons.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

9
survey_link_input_ratio/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-25 11:14+0000\n"
"PO-Revision-Date: 2020-03-25 11:14+0000\n"
"POT-Creation-Date: 2023-03-02 15:56+0000\n"
"PO-Revision-Date: 2023-03-02 15:56+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -16,7 +16,7 @@ msgstr ""
"Plural-Forms: \n"
#. module: survey_link_input_ratio
#: code:addons/survey_link_input_ratio/models/survey_survey.py:55
#: code:addons/survey_link_input_ratio/models/survey_survey.py:91
#, python-format
msgid " (from private links)"
msgstr " (invitations privées)"
@ -55,3 +55,4 @@ msgstr "Ratio de réponses privées en cours"
#: model:ir.model,name:survey_link_input_ratio.model_survey_survey
msgid "Survey"
msgstr "Sondage"

57
survey_link_input_ratio/i18n/survey_link_input_ratio.pot

@ -1,57 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_link_input_ratio
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-25 11:17+0000\n"
"PO-Revision-Date: 2020-03-25 11:17+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_link_input_ratio
#: code:addons/survey_link_input_ratio/models/survey_survey.py:55
#, python-format
msgid " (from private links)"
msgstr ""
#. module: survey_link_input_ratio
#: model_terms:ir.ui.view,arch_db:survey_link_input_ratio.survey_survey_form
msgid "Completed"
msgstr ""
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__tot_sent_comp_survey
msgid "Completed sent survey count"
msgstr ""
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__sent_comp_ratio
msgid "Completed sent survey ratio"
msgstr ""
#. module: survey_link_input_ratio
#: model_terms:ir.ui.view,arch_db:survey_link_input_ratio.survey_survey_form
msgid "Started"
msgstr ""
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__tot_sent_start_survey
msgid "Started sent survey count"
msgstr ""
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__sent_start_ratio
msgid "Started sent survey ratio"
msgstr ""
#. module: survey_link_input_ratio
#: model:ir.model,name:survey_link_input_ratio.model_survey_survey
msgid "Survey"
msgstr ""

33
survey_link_input_ratio/models/survey_survey.py

@ -23,13 +23,28 @@ class SurveySurvey(models.Model):
@api.multi
def _count_sent_input(self):
UserInput = self.env["survey.user_input"]
sent_start_survey = UserInput.search(
[
("survey_id", "in", self.ids),
("type", "=", "link"),
("state", "=", "skip"),
]
)
sent_start_survey = UserInput
if hasattr(UserInput, "date_start") and hasattr(UserInput, "date_done"):
# Made to be more precise on searching
# if survey_user_input_dates module is installed
# so it also finds one page surveys started
# which remain to 'new' state until submission
sent_start_survey = UserInput.search(
[
("survey_id", "in", self.ids),
("type", "=", "link"),
("date_start", "!=", False),
("date_done", "=", False),
]
)
else:
sent_start_survey = UserInput.search(
[
("survey_id", "in", self.ids),
("type", "=", "link"),
("state", "=", "skip"),
]
)
sent_comp_survey = UserInput.search(
[
("survey_id", "in", self.ids),
@ -40,12 +55,12 @@ class SurveySurvey(models.Model):
for survey in self:
survey.tot_sent_start_survey = len(
sent_start_survey.filtered(
lambda user_input: user_input.survey_id == survey
lambda user_input: user_input.survey_id.id == survey.id
)
)
survey.tot_sent_comp_survey = len(
sent_comp_survey.filtered(
lambda user_input: user_input.survey_id == survey
lambda user_input: user_input.survey_id.id == survey.id
)
)

2
survey_link_input_ratio/views/survey_survey.xml

@ -2,7 +2,7 @@
<odoo>
<record id="survey_survey_form" model="ir.ui.view">
<field name="name">survey_sent_input_ratio survey.survey form</field>
<field name="name">survey_link_input_ratio survey.survey form</field>
<field name="model">survey.survey</field>
<field name="inherit_id" ref="survey.survey_form"/>
<field name="priority">24</field>

0
survey_page_duplicate/__init__.py

39
survey_page_duplicate/__manifest__.py

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Survey page duplicate",
"version": "1.0.0",
"summary": """
Quick duplicate surveys' pages
""",
"description": """
This module adds a \"Duplicate\" button in pages lines on survey form, only in edit mode.
""",
"author": "RemiFr82",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",
# "price": 0,
# "currency": "EUR",
"application": False,
"installable": True,
"auto_install": False,
"pre_init_hook": "",
"post_init_hook": "",
"uninstall_hook": "",
"excludes": [],
"external_dependencies": [],
"depends": [
"survey",
],
"data": [
"views/survey_survey.xml",
],
"css": [],
"images": [],
"js": [],
"test": [],
"demo": [],
"maintainer": "RemiFr82",
}

22
survey_page_duplicate/i18n/fr.po

@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_page_duplicate
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-02 16:54+0000\n"
"PO-Revision-Date: 2023-03-02 16:54+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_page_duplicate
#: model_terms:ir.ui.view,arch_db:survey_page_duplicate.survey_survey_form
msgid "Duplicate"
msgstr "Dupliquer"

16
survey_page_duplicate/views/survey_survey.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="survey_survey_form" model="ir.ui.view">
<field name="name">survey_page_duplicate survey.survey form</field>
<field name="model">survey.survey</field>
<field name="inherit_id" ref="survey.survey_form"/>
<field name="priority">20</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='page_ids']/tree" position="inside">
<button type="object" name="copy" string="Duplicate" icon="fa-copy" class="oe_edit_only"/>
</xpath>
</field>
</record>
</odoo>

9
survey_partner_input/__manifest__.py

@ -4,11 +4,13 @@
"name": "Survey partner answers",
"version": "1.0.0",
"summary": """
This module displays a counter and a percent pie on partner survey answers statistics in form stat-buttons.
Surveys statistics on partner form
""",
"description": """
This module displays a counter and a percent pie about survey answers statistics in partner form stat-buttons.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",
@ -24,6 +26,7 @@
"external_dependencies": [],
"depends": [
"survey",
"contacts",
],
"data": [
"views/res_partner.xml",

20
survey_partner_input/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-25 22:46+0000\n"
"PO-Revision-Date: 2020-03-25 22:46+0000\n"
"POT-Creation-Date: 2023-03-02 16:12+0000\n"
"PO-Revision-Date: 2023-03-02 16:12+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -15,6 +15,12 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_partner_input
#: code:addons/survey_partner_input/models/res_partner.py:85
#, python-format
msgid " from {}"
msgstr " de {}"
#. module: survey_partner_input
#: model_terms:ir.ui.view,arch_db:survey_partner_input.res_partner_form
msgid "Answers"
@ -46,10 +52,16 @@ msgstr "Réponses terminées"
#. module: survey_partner_input
#: model:ir.model,name:survey_partner_input.model_res_partner
msgid "Contact"
msgstr "Contact"
msgstr ""
#. module: survey_partner_input
#: model:ir.model.fields,field_description:survey_partner_input.field_res_partner__tot_sent_survey
#: model:ir.model.fields,field_description:survey_partner_input.field_res_users__tot_sent_survey
msgid "Sent survey count"
msgstr "Sondages envoyés en privé"
#. module: survey_partner_input
#: model_terms:ir.ui.view,arch_db:survey_partner_input.survey_user_input_search
msgid "State"
msgstr "État"

56
survey_partner_input/i18n/survey_partner_input.pot

@ -1,56 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_partner_input
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-25 22:42+0000\n"
"PO-Revision-Date: 2020-03-25 22:42+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_partner_input
#: model_terms:ir.ui.view,arch_db:survey_partner_input.res_partner_form
msgid "Answers"
msgstr ""
#. module: survey_partner_input
#: model_terms:ir.ui.view,arch_db:survey_partner_input.res_partner_form
msgid "Completed"
msgstr ""
#. module: survey_partner_input
#: model:ir.model.fields,field_description:survey_partner_input.field_res_partner__tot_sent_comp_survey
#: model:ir.model.fields,field_description:survey_partner_input.field_res_users__tot_sent_comp_survey
msgid "Completed sent survey count"
msgstr ""
#. module: survey_partner_input
#: model:ir.model.fields,field_description:survey_partner_input.field_res_partner__sent_comp_ratio
#: model:ir.model.fields,field_description:survey_partner_input.field_res_users__sent_comp_ratio
msgid "Completed sent survey ratio"
msgstr ""
#. module: survey_partner_input
#: model:ir.model.fields,field_description:survey_partner_input.field_res_partner__tot_comp_survey
#: model:ir.model.fields,field_description:survey_partner_input.field_res_users__tot_comp_survey
msgid "Completed survey count"
msgstr ""
#. module: survey_partner_input
#: model:ir.model,name:survey_partner_input.model_res_partner
msgid "Contact"
msgstr ""
#. module: survey_partner_input
#: model:ir.model.fields,field_description:survey_partner_input.field_res_partner__tot_sent_survey
#: model:ir.model.fields,field_description:survey_partner_input.field_res_users__tot_sent_survey
msgid "Sent survey count"
msgstr ""

4
survey_partner_input/views/survey_user_input.xml

@ -2,13 +2,13 @@
<odoo>
<record id="survey_user_input_search" model="ir.ui.view">
<field name="name">survey_select_input survey.user_input search</field>
<field name="name">survey_partner_input survey.user_input search</field>
<field name="model">survey.user_input</field>
<field name="inherit_id" ref="survey.survey_user_input_search"/>
<field name="priority">26</field>
<field name="arch" type="xml">
<filter name="group_by_partner" position="after">
<filter name="by_state" string="État" domain="[]" context="{'group_by': 'state'}"/>
<filter name="by_state" string="State" domain="[]" context="{'group_by': 'state'}"/>
</filter>
</field>
</record>

8
survey_question_duplicate/__manifest__.py

@ -4,11 +4,13 @@
"name": "Survey question duplicate",
"version": "1.0.0",
"summary": """
This module adds a \"Copy\" button in question lines on survey page form, only in edit mode.
Quick duplicate surveys' questions
""",
"description": """
This module adds a \"Duplicate\" button in question lines on survey page form, only in edit mode.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

22
survey_question_duplicate/i18n/fr.po

@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_question_duplicate
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-02 16:22+0000\n"
"PO-Revision-Date: 2023-03-02 16:22+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_question_duplicate
#: model_terms:ir.ui.view,arch_db:survey_question_duplicate.survey_page_form
msgid "Duplicate"
msgstr "Dupliquer"

4
survey_question_duplicate/views/survey_page.xml

@ -2,13 +2,13 @@
<odoo>
<record id="survey_page_form" model="ir.ui.view">
<field name="name">survey_input_attachment survey.page form</field>
<field name="name">survey_question_duplicate survey.page form</field>
<field name="model">survey.page</field>
<field name="inherit_id" ref="survey.survey_page_form"/>
<field name="priority">20</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='question_ids']/tree" position="inside">
<button type="object" name="copy" string="Dupliquer" icon="fa-copy" class="oe_edit_only"/>
<button type="object" name="copy" string="Duplicate" icon="fa-copy" class="oe_edit_only"/>
</xpath>
</field>
</record>

8
survey_select_input/__manifest__.py

@ -4,11 +4,13 @@
"name": "Survey answer selection",
"version": "1.0.0",
"summary": """
This module adds the mossibility to select some of the surveys answers.
Mark survey answers as selected
""",
"description": """
This module adds the possibility to select some of the surveys answers in form and list views.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

52
survey_select_input/i18n/survey_select_input.pot

@ -1,52 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_select_input
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-23 10:27+0000\n"
"PO-Revision-Date: 2020-03-23 10:27+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_select_input
#: code:addons/survey_select_input/models/survey_survey.py:26
#, python-format
msgid " from all ones"
msgstr ""
#. module: survey_select_input
#: code:addons/survey_select_input/models/survey_survey.py:24
#, python-format
msgid " selected"
msgstr ""
#. module: survey_select_input
#: model:ir.model.fields,field_description:survey_select_input.field_survey_survey__tot_selected_survey
msgid "Number of selected surveys"
msgstr ""
#. module: survey_select_input
#: model:ir.model.fields,field_description:survey_select_input.field_survey_user_input__selected
#: model_terms:ir.ui.view,arch_db:survey_select_input.survey_survey_form
#: model_terms:ir.ui.view,arch_db:survey_select_input.survey_user_input_search
#: model_terms:ir.ui.view,arch_db:survey_select_input.view_survey_user_input_kanban
msgid "Selected"
msgstr ""
#. module: survey_select_input
#: model:ir.model,name:survey_select_input.model_survey_survey
msgid "Survey"
msgstr ""
#. module: survey_select_input
#: model:ir.model,name:survey_select_input.model_survey_user_input
msgid "Survey User Input"
msgstr ""

25
survey_select_input/models/survey_survey.py

@ -2,24 +2,29 @@ from odoo import models, fields, api, _
class SurveySurvey(models.Model):
_inherit = 'survey.survey'
_inherit = "survey.survey"
tot_selected_survey = fields.Integer("Number of selected surveys", compute="_get_selected_input")
tot_selected_survey = fields.Integer(
"Number of selected surveys", compute="_get_selected_input"
)
@api.depends('user_input_ids', 'user_input_ids.selected')
@api.depends("user_input_ids", "user_input_ids.selected")
def _get_selected_input(self):
selected_survey = self.env['survey.user_input'].search([
('survey_id', 'in', self.ids),
('selected', '=', True)
])
selected_survey = self.env["survey.user_input"].search(
[("survey_id", "in", self.ids), ("selected", "=", True)]
)
for survey in self:
survey.tot_selected_survey = len(selected_survey.filtered(lambda user_input: user_input.survey_id == survey))
survey.tot_selected_survey = len(
selected_survey.filtered(
lambda user_input: user_input.survey_id == survey
)
)
# ACTIONS
@api.multi
def action_survey_user_input(self):
action = super(SurveySurvey, self).action_survey_user_input()
if self.env.context.get('search_default_selected', False):
action['display_name'] += _(" selected")
if self.env.context.get("search_default_selected", False):
action["display_name"] += _(" selected")
return action

8
survey_select_input/models/survey_user_input.py

@ -2,12 +2,12 @@ from odoo import models, fields, api
class SurveyUserInput(models.Model):
_inherit = 'survey.user_input'
_inherit = "survey.user_input"
selected = fields.Boolean(string="Selected", default=False)
@api.multi
def toggle_selected(self):
unselect = self.filtered('selected')
unselect.write({'selected': False})
(self - unselect).write({'selected': True})
unselect = self.filtered("selected")
unselect.write({"selected": False})
(self - unselect).write({"selected": True})

8
survey_template/__manifest__.py

@ -4,11 +4,13 @@
"name": "Survey template",
"version": "1.0.0",
"summary": """
This module adds templating feature on surveys and their own menu item.
Manage survey templates
""",
"description": """
This module adds templating features on surveys : create a survey from a template and the reverse operation.
""",
"description": """ """,
"author": "RemiFr82",
"contributors": "",
"contributors": "Sudokeys",
"website": "https://remifr82.me",
"license": "LGPL-3",
"category": "Marketing",

41
survey_template/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-09-28 16:48+0000\n"
"PO-Revision-Date: 2020-09-28 16:48+0000\n"
"POT-Creation-Date: 2023-02-28 17:15+0000\n"
"PO-Revision-Date: 2023-02-28 17:15+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -15,34 +15,6 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:16
#: code:addons/survey_template/models/survey_survey.py:17
#: code:addons/survey_template/models/survey_survey.py:52
#: code:addons/survey_template/models/survey_survey.py:54
#: code:addons/survey_template/models/survey_survey.py:55
#, python-format
msgid " (Template)"
msgstr " (Modèle)"
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:28
#, python-format
msgid " (copy)"
msgstr " (copie)"
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:28
#, python-format
msgid " (template)"
msgstr " (modèle)"
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:51
#, python-format
msgid "(Template)"
msgstr "(Modèle)"
#. module: survey_template
#: model_terms:ir.ui.view,arch_db:survey_template.survey_survey_template_kanban
msgid "Color"
@ -107,19 +79,20 @@ msgid "This survey is a template"
msgstr "Ce sondage est un modèle"
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:42
#: code:addons/survey_template/models/survey_survey.py:71
#, python-format
msgid "You cannot send a template survey, create a new survey from this template and you'll be able to share it."
msgstr "Vous ne pouvez pas partager un modèle de sondage, créez un nouveau sondage à partir de ce modèle et vous pourrez le partager."
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:35
#: code:addons/survey_template/models/survey_survey.py:31
#, python-format
msgid "You should use the \"Copy\" secondary action to duplicate a non-template survey."
msgstr "Vous devez utiliser l'action secondaire \"Dupliquer\" pour les sondages qui ne sont pas des modèles."
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:26
#: code:addons/survey_template/models/survey_survey.py:51
#, python-format
msgid "You should use the \"Copy\" secondary action to duplicate a survey template."
msgstr "Vous devez utiliser l'action secondaire \"Dupliquer\" pour copier les modèles de sondages."

126
survey_template/i18n/survey_template.pot

@ -1,126 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_template
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-28 16:53+0000\n"
"PO-Revision-Date: 2020-09-28 16: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_template
#: code:addons/survey_template/models/survey_survey.py:16
#: code:addons/survey_template/models/survey_survey.py:17
#: code:addons/survey_template/models/survey_survey.py:52
#: code:addons/survey_template/models/survey_survey.py:54
#: code:addons/survey_template/models/survey_survey.py:55
#, python-format
msgid " (Template)"
msgstr ""
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:28
#, python-format
msgid " (copy)"
msgstr ""
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:28
#, python-format
msgid " (template)"
msgstr ""
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:51
#, python-format
msgid "(Template)"
msgstr ""
#. module: survey_template
#: model_terms:ir.ui.view,arch_db:survey_template.survey_survey_template_kanban
msgid "Color"
msgstr ""
#. module: survey_template
#: model_terms:ir.actions.act_window,help:survey_template.survey_survey_template_act_window
msgid "Create a new survey template from here"
msgstr ""
#. module: survey_template
#: model_terms:ir.ui.view,arch_db:survey_template.survey_survey_form
#: model_terms:ir.ui.view,arch_db:survey_template.survey_survey_template_tree
msgid "Create a survey from this template"
msgstr ""
#. module: survey_template
#: model:ir.actions.server,name:survey_template.survey_survey_to_template_server
msgid "Create template from survey"
msgstr ""
#. module: survey_template
#: model_terms:ir.ui.view,arch_db:survey_template.survey_survey_template_kanban
msgid "Delete template"
msgstr ""
#. module: survey_template
#: model_terms:ir.ui.view,arch_db:survey_template.survey_survey_template_kanban
msgid "Dropdown menu"
msgstr ""
#. module: survey_template
#: model:ir.model.fields,field_description:survey_template.field_survey_survey__is_template
msgid "Is a template"
msgstr ""
#. module: survey_template
#: model_terms:ir.ui.view,arch_db:survey_template.survey_survey_template_kanban
msgid "Modify template"
msgstr ""
#. module: survey_template
#: model:ir.model,name:survey_template.model_survey_survey
msgid "Survey"
msgstr ""
#. module: survey_template
#: model:ir.actions.act_window,name:survey_template.survey_survey_template_act_window
#: model:ir.ui.menu,name:survey_template.survey_survey_template_menu
msgid "Survey templates"
msgstr ""
#. module: survey_template
#: model_terms:ir.ui.view,arch_db:survey_template.survey_survey_kanban
#: model_terms:ir.ui.view,arch_db:survey_template.survey_survey_template_kanban
msgid "Template"
msgstr ""
#. module: survey_template
#: model_terms:ir.ui.view,arch_db:survey_template.survey_survey_form
msgid "This survey is a template"
msgstr ""
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:42
#, python-format
msgid "You cannot send a template survey, create a new survey from this template and you'll be able to share it."
msgstr ""
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:35
#, python-format
msgid "You should use the \"Copy\" secondary action to duplicate a non-template survey."
msgstr ""
#. module: survey_template
#: code:addons/survey_template/models/survey_survey.py:26
#, python-format
msgid "You should use the \"Copy\" secondary action to duplicate a survey template."
msgstr ""

42
survey_template/models/survey_survey.py

@ -5,30 +5,33 @@ from odoo.exceptions import UserError
class SurveySurvey(models.Model):
_inherit = "survey.survey"
is_template = fields.Boolean(string="Is a template", default=False, copy=False)
is_template = fields.Boolean(string="Is a template", default=False, copy=True)
@api.multi
def copy_data(self, default=None):
data = super(SurveySurvey, self).copy_data(default)[0]
title = isinstance(default, dict) and default.get("title", False) or False
if title:
data["title"] = title
elif _(" (Template)") in data["title"]:
data["title"] = data["title"].replace(_(" (Template)"), "")
default = dict(default or {})
if (
self.is_template
and default.get("is_template", None) is False
or not self.is_template
and default.get("is_template", False)
):
data.update({"title": self.title})
return [data]
# ACTIONS
@api.multi
def create_template_from_survey(self, default={}):
def create_survey_from_template(self, default={}):
self.ensure_one()
if self.is_template:
if not self.is_template:
raise UserError(
_(
'You should use the "Copy" secondary action to duplicate a survey template.'
'You should use the "Copy" secondary action to duplicate a non-template survey.'
)
)
default.update({"is_template": True})
default.update({"is_template": False})
new_survey = self.copy(default=default)
return {
"type": "ir.actions.act_window",
@ -40,14 +43,15 @@ class SurveySurvey(models.Model):
}
@api.multi
def create_survey_from_template(self, default={}):
def create_template_from_survey(self, default={}):
self.ensure_one()
if not self.is_template:
if self.is_template:
raise UserError(
_(
'You should use the "Copy" secondary action to duplicate a non-template survey.'
'You should use the "Copy" secondary action to duplicate a survey template.'
)
)
default.update({"is_template": True})
new_survey = self.copy(default=default)
return {
"type": "ir.actions.act_window",
@ -68,15 +72,3 @@ class SurveySurvey(models.Model):
)
)
return super(SurveySurvey, self).action_send_survey()
# ONCHANGES
@api.onchange("is_template")
def onchange_is_template(self):
if self.title:
if self.is_template:
if _("(Template)") not in self.title:
self.title = self.title.strip() + _(" (Template)")
else:
if _(" (Template)") in self.title:
self.title = self.title.replace(_(" (Template)"), "")

15
survey_template/views/survey_survey.xml

@ -13,16 +13,15 @@
<field name="is_template" invisible="1"/>
</field>
<!-- Hide send button and stage on templates -->
<button name="action_send_survey" position="attributes">
<header position="attributes">
<attribute name="attrs">{'invisible': [('is_template', '=', True)]}</attribute>
</button>
<field name="stage_id" position="before">
<button type="object" name="create_survey_from_template" string="Create a survey from this template"
</header>
<header position="after">
<header attrs="{'invisible': [('is_template', '=', False)]}">
<button type="object" name="create_survey_from_template" string="Create a survey from this template"
attrs="{'invisible':[('is_template','=',False)]}" class="btn btn-warning" icon="fa-copy"/>
</field>
<field name="stage_id" position="attributes">
<attribute name="attrs">{'invisible': [('is_template', '=', True)]}</attribute>
</field>
</header>
</header>
<div name="button_box" position="after">
<h2 class="badge-pill badge-warning float-right" attrs="{'invisible': [('is_template', '=', False)]}">This survey is a template</h2>
</div>

Loading…
Cancel
Save