diff --git a/README.md b/README.md deleted file mode 100644 index 4580882..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# sudokeys-survey-addons - -Modules étendant les fonctionnalités des sondages développés par SUDOKEYS. \ No newline at end of file diff --git a/survey_custom_matrix/__manifest__.py b/survey_custom_matrix/__manifest__.py index 7dd4b5b..96944f6 100644 --- a/survey_custom_matrix/__manifest__.py +++ b/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", diff --git a/survey_custom_matrix/i18n/fr.po b/survey_custom_matrix/i18n/fr.po index 550615b..bdd3af9 100644 --- a/survey_custom_matrix/i18n/fr.po +++ b/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" + diff --git a/survey_custom_matrix/i18n/survey_custom_matrix.pot b/survey_custom_matrix/i18n/survey_custom_matrix.pot deleted file mode 100644 index dcb4ab7..0000000 --- a/survey_custom_matrix/i18n/survey_custom_matrix.pot +++ /dev/null @@ -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 "" diff --git a/survey_custom_matrix/models/survey_label.py b/survey_custom_matrix/models/survey_label.py index aea02a8..726c0c2 100644 --- a/survey_custom_matrix/models/survey_label.py +++ b/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") diff --git a/survey_custom_matrix/models/survey_question.py b/survey_custom_matrix/models/survey_question.py index b24fceb..5b19867 100644 --- a/survey_custom_matrix/models/survey_question.py +++ b/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): diff --git a/survey_custom_matrix/views/survey_question.xml b/survey_custom_matrix/views/survey_question.xml index 33e4fd8..0a4890b 100644 --- a/survey_custom_matrix/views/survey_question.xml +++ b/survey_custom_matrix/views/survey_question.xml @@ -7,8 +7,9 @@ - - + + diff --git a/survey_deadline_autoclose/__manifest__.py b/survey_deadline_autoclose/__manifest__.py index 36705fa..0749915 100644 --- a/survey_deadline_autoclose/__manifest__.py +++ b/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", diff --git a/survey_deadline_autoclose/data/ir_cron.xml b/survey_deadline_autoclose/data/ir_cron.xml index 6a2e338..f32dc7a 100644 --- a/survey_deadline_autoclose/data/ir_cron.xml +++ b/survey_deadline_autoclose/data/ir_cron.xml @@ -7,7 +7,7 @@ Close expired surveys code - model.with_context(cron=True).close_deadline_survey() + model.with_context(cron=True).cron_close_deadline_survey() 1 diff --git a/survey_deadline_autoclose/data/mail_message_subtype.xml b/survey_deadline_autoclose/data/mail_message_subtype.xml index f2c95ef..7902f5e 100644 --- a/survey_deadline_autoclose/data/mail_message_subtype.xml +++ b/survey_deadline_autoclose/data/mail_message_subtype.xml @@ -7,6 +7,7 @@ survey.survey + This survey has expired. @@ -15,7 +16,8 @@ survey.survey - This survey was closed. + + This survey is closed. diff --git a/survey_deadline_autoclose/i18n/fr.po b/survey_deadline_autoclose/i18n/fr.po index 09fb9ee..4965cba 100644 --- a/survey_deadline_autoclose/i18n/fr.po +++ b/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." + diff --git a/survey_deadline_autoclose/i18n/survey_deadline_autoclose.pot b/survey_deadline_autoclose/i18n/survey_deadline_autoclose.pot deleted file mode 100644 index 98c1f6e..0000000 --- a/survey_deadline_autoclose/i18n/survey_deadline_autoclose.pot +++ /dev/null @@ -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 "" diff --git a/survey_deadline_autoclose/models/survey_survey.py b/survey_deadline_autoclose/models/survey_survey.py index 0f6ff59..98022f4 100644 --- a/survey_deadline_autoclose/models/survey_survey.py +++ b/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 diff --git a/survey_description/__manifest__.py b/survey_description/__manifest__.py index a683ec1..8ed4863 100644 --- a/survey_description/__manifest__.py +++ b/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", diff --git a/survey_description/i18n/fr.po b/survey_description/i18n/fr.po index 19fed8b..afe45aa 100644 --- a/survey_description/i18n/fr.po +++ b/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.
\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.
\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." + diff --git a/survey_description/i18n/survey_description.pot b/survey_description/i18n/survey_description.pot deleted file mode 100644 index 22e1437..0000000 --- a/survey_description/i18n/survey_description.pot +++ /dev/null @@ -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.
\n" -" You can also add a custom content on each page of the survey through the \"Description\" field." -msgstr "" diff --git a/survey_description/views/survey_survey.xml b/survey_description/views/survey_survey.xml index 4685684..88023d0 100644 --- a/survey_description/views/survey_survey.xml +++ b/survey_description/views/survey_survey.xml @@ -12,14 +12,14 @@

This content will be displayed between the title of the survey and the "Start" button, on the answer homepage.
- 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.

- + diff --git a/survey_input_attachment/__manifest__.py b/survey_input_attachment/__manifest__.py index 376628a..488399b 100644 --- a/survey_input_attachment/__manifest__.py +++ b/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", diff --git a/survey_input_attachment/i18n/fr.po b/survey_input_attachment/i18n/fr.po index fdfc2af..bcac29a 100644 --- a/survey_input_attachment/i18n/fr.po +++ b/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" + diff --git a/survey_input_attachment/i18n/survey_attachment.pot b/survey_input_attachment/i18n/survey_attachment.pot deleted file mode 100644 index f5ae26f..0000000 --- a/survey_input_attachment/i18n/survey_attachment.pot +++ /dev/null @@ -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 "" diff --git a/survey_input_dates/__manifest__.py b/survey_input_dates/__manifest__.py index 63dae3a..044e6aa 100644 --- a/survey_input_dates/__manifest__.py +++ b/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", diff --git a/survey_input_dates/i18n/fr.po b/survey_input_dates/i18n/fr.po index 503c3bf..c8d4f1f 100644 --- a/survey_input_dates/i18n/fr.po +++ b/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é\"." + diff --git a/survey_input_dates/i18n/survey_input_dates.pot b/survey_input_dates/i18n/survey_input_dates.pot deleted file mode 100644 index 6c66d3f..0000000 --- a/survey_input_dates/i18n/survey_input_dates.pot +++ /dev/null @@ -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 "" - diff --git a/survey_input_dates/models/survey_user_input.py b/survey_input_dates/models/survey_user_input.py index 57bdb7d..9ac42a7 100644 --- a/survey_input_dates/models/survey_user_input.py +++ b/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): diff --git a/survey_input_dates/views/survey_user_input.xml b/survey_input_dates/views/survey_user_input.xml index 7d71043..d2c3d38 100644 --- a/survey_input_dates/views/survey_user_input.xml +++ b/survey_input_dates/views/survey_user_input.xml @@ -11,7 +11,8 @@ - + + @@ -26,7 +27,8 @@ - + + @@ -41,7 +43,8 @@ - + + diff --git a/survey_input_odoo_debrand/__manifest__.py b/survey_input_odoo_debrand/__manifest__.py index 8e87495..f199c4f 100644 --- a/survey_input_odoo_debrand/__manifest__.py +++ b/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", diff --git a/survey_input_template_custom/__manifest__.py b/survey_input_template_custom/__manifest__.py index 858a006..d6a0e98 100644 --- a/survey_input_template_custom/__manifest__.py +++ b/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", diff --git a/survey_input_template_custom/i18n/fr.po b/survey_input_template_custom/i18n/fr.po index 9b101c0..b7a1e71 100644 --- a/survey_input_template_custom/i18n/fr.po +++ b/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 !\"." + diff --git a/survey_input_template_custom/i18n/survey_input_template_custom.pot b/survey_input_template_custom/i18n/survey_input_template_custom.pot deleted file mode 100644 index 7c07985..0000000 --- a/survey_input_template_custom/i18n/survey_input_template_custom.pot +++ /dev/null @@ -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 "\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 "" diff --git a/survey_input_template_custom/models/survey_survey.py b/survey_input_template_custom/models/survey_survey.py index 20cfb5a..63ef4b7 100644 --- a/survey_input_template_custom/models/survey_survey.py +++ b/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 !".', + ) diff --git a/survey_input_template_custom/views/survey_survey.xml b/survey_input_template_custom/views/survey_survey.xml index 8f2e79f..4b41e2e 100644 --- a/survey_input_template_custom/views/survey_survey.xml +++ b/survey_input_template_custom/views/survey_survey.xml @@ -11,7 +11,7 @@ - + diff --git a/survey_link_input_ratio/__manifest__.py b/survey_link_input_ratio/__manifest__.py index 97fda44..23ca6fa 100644 --- a/survey_link_input_ratio/__manifest__.py +++ b/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", diff --git a/survey_link_input_ratio/i18n/fr.po b/survey_link_input_ratio/i18n/fr.po index b60d1c6..ee2441c 100644 --- a/survey_link_input_ratio/i18n/fr.po +++ b/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" + diff --git a/survey_link_input_ratio/i18n/survey_link_input_ratio.pot b/survey_link_input_ratio/i18n/survey_link_input_ratio.pot deleted file mode 100644 index 06df683..0000000 --- a/survey_link_input_ratio/i18n/survey_link_input_ratio.pot +++ /dev/null @@ -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 "" diff --git a/survey_link_input_ratio/models/survey_survey.py b/survey_link_input_ratio/models/survey_survey.py index cac7a50..594c0a7 100644 --- a/survey_link_input_ratio/models/survey_survey.py +++ b/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 ) ) diff --git a/survey_link_input_ratio/views/survey_survey.xml b/survey_link_input_ratio/views/survey_survey.xml index 7504914..d53de09 100644 --- a/survey_link_input_ratio/views/survey_survey.xml +++ b/survey_link_input_ratio/views/survey_survey.xml @@ -2,7 +2,7 @@ - survey_sent_input_ratio survey.survey form + survey_link_input_ratio survey.survey form survey.survey 24 diff --git a/survey_page_duplicate/__init__.py b/survey_page_duplicate/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/survey_page_duplicate/__manifest__.py b/survey_page_duplicate/__manifest__.py new file mode 100644 index 0000000..e27ed5b --- /dev/null +++ b/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", +} diff --git a/survey_page_duplicate/i18n/fr.po b/survey_page_duplicate/i18n/fr.po new file mode 100644 index 0000000..1f32cf4 --- /dev/null +++ b/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" + diff --git a/survey_page_duplicate/views/survey_survey.xml b/survey_page_duplicate/views/survey_survey.xml new file mode 100644 index 0000000..8786f62 --- /dev/null +++ b/survey_page_duplicate/views/survey_survey.xml @@ -0,0 +1,16 @@ + + + + + survey_page_duplicate survey.survey form + survey.survey + + 20 + + + - -