Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions survey_result_mail/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
==================
Survey Result Mail
==================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:acb56876a3be92a6474b4858fbd735f2c4286990e7d295866b879dcdbabba931
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsurvey-lightgray.png?logo=github
:target: https://github.com/OCA/survey/tree/18.0/survey_result_mail
:alt: OCA/survey
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/survey-18-0/survey-18-0-survey_result_mail
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/survey&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the functionality of surveys to allow you to send an
automatic email with the survey answers to the filler as soon as the
questionary is completed.

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure automatic result sending to the user:

1. Go to the survey you want to configure.
2. In the *Options* tab, you'll find a new *Send survey answers* option
that you can set on to send an automatic email with the user's
answers.
3. You can also choose which mail template to send. This module provides
two. One with the answers inlined and another with the answers
attached as pdf report.

Usage
=====

To test this module, you can:

1. Go to a survey an *Test* it.
2. Once finsished a mail with the aswers attached will be sent.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/survey/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/survey/issues/new?body=module:%20survey_result_mail%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__

- David Vidal
- Pilar Vargas

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-pilarvargas-tecnativa| image:: https://github.com/pilarvargas-tecnativa.png?size=40px
:target: https://github.com/pilarvargas-tecnativa
:alt: pilarvargas-tecnativa

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-pilarvargas-tecnativa|

This module is part of the `OCA/survey <https://github.com/OCA/survey/tree/18.0/survey_result_mail>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions survey_result_mail/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions survey_result_mail/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2023 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Survey Result Mail",
"summary": "Send survey answers to the survey user",
"version": "18.0.1.0.0",
"development_status": "Beta",
"category": "Marketing/Survey",
"website": "https://github.com/OCA/survey",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["pilarvargas-tecnativa"],
"license": "AGPL-3",
"depends": ["survey"],
"data": [
"templates/survey_answer_templates.xml",
"reports/survey_answer_report.xml",
"data/mail_template.xml",
"views/survey_survey_views.xml",
"views/survey_user_input_views.xml",
],
}
59 changes: 59 additions & 0 deletions survey_result_mail/data/mail_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="mail_template_user_input_result_report" model="mail.template">
<field name="name">Survey: Results (with report)</field>
<field name="model_id" ref="model_survey_user_input" />
<field name="subject">Results for your {{object.survey_id.title}} survey</field>
<field
name="email_to"
>{{ (object.partner_id.email_formatted or object.email) }}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px; font-size: 13px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear <t t-out="object.partner_id.name or object.nickname or 'participant'" />.
<br /><br />

You'll find attached your survey answers so you can review them.


Thanks you for your participation.
</p>
</div>
</field>
<field
name="report_template_ids"
eval="[(4, ref('survey_result_mail.survey_result_report'))]"
/>
<field name="lang">{{object.partner_id.lang}}</field>
<field name="auto_delete" eval="True" />
</record>
<record id="mail_template_user_input_result_inline" model="mail.template">
<field name="name">Survey: Results (inline)</field>
<field name="model_id" ref="model_survey_user_input" />
<field name="subject">Results for your {{object.survey_id.title}} survey</field>
<field
name="email_from"
>{{ (object.survey_id.user_id.email_formatted or user.email_formatted) }}</field>
<field
name="email_to"
>{{ (object.partner_id.email_formatted or object.email) }}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px; font-size: 13px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear <t t-out="object.partner_id.name or object.nickname or 'participant'" />.
<br /><br />

Here you have a copy of your answers:
</p>
<p>
<t t-out="object._build_answers_html()" />
</p>
<p>
Thanks you for your participation.
</p>
</div>
</field>
<field name="lang">{{object.partner_id.lang}}</field>
<field name="auto_delete" eval="True" />
</record>
</odoo>
159 changes: 159 additions & 0 deletions survey_result_mail/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_result_mail
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-11-16 11:28+0000\n"
"PO-Revision-Date: 2023-11-16 12:36+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.4\n"

#. module: survey_result_mail
#: model:ir.actions.report,print_report_name:survey_result_mail.survey_result_report
msgid "'Survey results - %s' % (object.survey_id.display_name)"
msgstr "'Resultados de la encuesta - %s' % (object.survey_id.display_name)"

#. module: survey_result_mail
#: model:mail.template,body_html:survey_result_mail.mail_template_user_input_result_inline
msgid ""
"<div style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" <p style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" Dear <t t-out=\"object.partner_id.name or object.nickname or "
"'participant'\"/>.\n"
" <br/><br/>\n"
"\n"
" Here you have a copy of your answers:\n"
" </p>\n"
" <p>\n"
" <t t-out=\"object._build_answers_html()\"/>\n"
" </p>\n"
" <p>\n"
" Thanks you for your participation.\n"
" </p>\n"
"</div>\n"
" "
msgstr ""
"<div style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" <p style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" Estimado/a <t t-out=\"object.partner_id.name or object.nickname or "
"'participant'\"/>.\n"
" <br/><br/>\n"
"\n"
" Aquí tiene una copia de sus respuestas:\n"
" </p>\n"
" <p>\n"
" <t t-out=\"object._build_answers_html()\"/>\n"
" </p>\n"
" <p>\n"
" Gracias por su participación.\n"
" </p>\n"
"</div>\n"
" "

#. module: survey_result_mail
#: model:mail.template,body_html:survey_result_mail.mail_template_user_input_result_report
msgid ""
"<div style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" <p style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" Dear <t t-out=\"object.partner_id.name or object.nickname or "
"'participant'\"/>.\n"
" <br/><br/>\n"
"\n"
" You'll find attached your survey answers so you can review them.\n"
"\n"
"\n"
" Thanks you for your participation.\n"
" </p>\n"
"</div>\n"
" "
msgstr ""
"<div style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" <p style=\"margin: 0px; padding: 0px; font-size: 13px;\">\n"
" Estimado/a <t t-out=\"object.partner_id.name or object.nickname or "
"'participant'\"/>.\n"
" <br/><br/>\n"
"\n"
" Encontrará adjuntas sus respuestas a la encuesta para que pueda "
"revisarlas.\n"
"\n"
"\n"
" Gracias por su participación.\n"
" </p>\n"
"</div>\n"
" "

#. module: survey_result_mail
#: model_terms:ir.ui.view,arch_db:survey_result_mail.survey_result_report_view_document
msgid ""
"<i class=\"fa fa-info-circle mr-2\"/><span>Reponses to your survey</span>"
msgstr ""
"<i class=\"fa fa-info-circle mr-2\"/><span>Respuestas de su encuesta</span>"

#. module: survey_result_mail
#: model:ir.model.fields,field_description:survey_result_mail.field_survey_survey__result_mail_template_id
msgid "Result Mail Template"
msgstr "Plantilla de resultados de encuesta"

#. module: survey_result_mail
#: model:mail.template,subject:survey_result_mail.mail_template_user_input_result_inline
#: model:mail.template,subject:survey_result_mail.mail_template_user_input_result_report
msgid "Results for your {{object.survey_id.title}} survey"
msgstr "Resultados para su encuesta {{object.survey_id.title}}"

#. module: survey_result_mail
#: model:ir.model.fields,field_description:survey_result_mail.field_survey_survey__send_result_mail
msgid "Send survey answers"
msgstr "Enviar respuestas de encuesta"

#. module: survey_result_mail
#: model:ir.model,name:survey_result_mail.model_survey_survey
msgid "Survey"
msgstr "Encuesta"

#. module: survey_result_mail
#: model:ir.model.fields,field_description:survey_result_mail.field_survey_user_input__survey_result
msgid "Survey Result"
msgstr "Resultado de la encuesta"

#. module: survey_result_mail
#: model:mail.template,report_name:survey_result_mail.mail_template_user_input_result_report
msgid "Survey Results"
msgstr "Resultados de la encuesta"

#. module: survey_result_mail
#: model:ir.model,name:survey_result_mail.model_survey_user_input
msgid "Survey User Input"
msgstr "Entrada de usuario de la encuesta"

#. module: survey_result_mail
#: model:ir.actions.report,name:survey_result_mail.survey_result_report
msgid "Survey results"
msgstr "Resultados de la encuesta"

#. module: survey_result_mail
#: model:mail.template,name:survey_result_mail.mail_template_user_input_result_inline
msgid "Survey: Results (inline)"
msgstr "Encuesta: Resultados (en línea)"

#. module: survey_result_mail
#: model:mail.template,name:survey_result_mail.mail_template_user_input_result_report
msgid "Survey: Results (with report)"
msgstr "Encuesta: Resultados (con informe)"

#. module: survey_result_mail
#: model:ir.model.fields,help:survey_result_mail.field_survey_survey__send_result_mail
msgid ""
"When the survey is submitted, an email will be sent to the user withthe "
"answers"
msgstr ""
"Cuando se completa la encuesta se envía un correo al usuario con las "
"respuestas"
Loading
Loading