Skip to content

Commit

Permalink
[NEW] survey_record_generation
Browse files Browse the repository at this point in the history
  • Loading branch information
clementthomas committed Feb 28, 2025
1 parent 75efb58 commit 4903808
Show file tree
Hide file tree
Showing 27 changed files with 2,368 additions and 0 deletions.
146 changes: 146 additions & 0 deletions survey_record_generation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
========================
Survey record generation
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:03eeb5c11b7d8330051c416331c84103b2641351fdc1d0a1bad43acd09501a33
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/16.0/survey_record_generation
:alt: OCA/survey
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/survey-16-0/survey-16-0-survey_record_generation
: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=16.0
:alt: Try me on Runboat

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

This module allows to generate any record from surveys answers.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

In several cases we want to use survey application to create records.
Website form application give the same possibility but the design is integrated on the web site.
Futhermore this module add other functionnalities like "duplicate" check, or creation of several interconnected records

Typical use case : Information request form

#. Submitting the form will create a contact (partner) only if it does not already exist in the database.
#. Submitting the form will also create a crm opportunity linked to previously created partner



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

Record generation configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. |Image of record creation list| image:: https://raw.githubusercontent.com/OCA/survey/16.0/survey_record_generation/static/description/record-creations.png

#. Go to the the survey
#. In *Record creation* tab add a new line
#. Set a name for created record, select the Model of the record (eg: Prospect)
#. Add a field configuration. So for each field :

.. |Image of record creation fields| image:: https://raw.githubusercontent.com/OCA/survey/16.0/survey_record_generation/static/description/record-creation-customer.png

#. You can check "unicity constraint" to prevent duplicates.
In case of duplicates and if other record use this record to fill a m2o field, the founded record will be used
#. You can configure explicitly where Odoo should retrieve the value of field :
* **fixed**: To set explicit value
* **question**: If value come from user's answer
For m2o or m2m links, question should be configured before. See Question answers configuration section below.
* **other created record**: If value come from other created record (m2o case only)



Question answers configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In a survey question : to configure value of choices

.. |Question answers| image:: https://raw.githubusercontent.com/OCA/survey/16.0/survey_record_generation/static/description/question-answers.png

#. Configure a multiple choice question
#. Select value type associated to answer:
* **Value** > eg: to fill a selection field
* **Record** > to fill m2o or m2m field
#. In case of *record* type:
#. Select referenced model
#. You can directly fill answers (eventualy with help of the domain field)
#. Or create new answers and set associated record
#. In case of *value* type:
#. Add new selectable answers and set associated value


Usage
=====

When a survey is properly configured, once it is submited by a user, records should be created.

To find records generated from a participation go to:

#. Survey > participation
#. Click on **# Generated records** button (top-right)

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_record_generation%0Aversion:%2016.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
~~~~~~~

* Elabore

Contributors
~~~~~~~~~~~~

* `Elabore <https://www.elabore.coop>`_

* Clément Thomas

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.

This module is part of the `OCA/survey <https://github.com/OCA/survey/tree/16.0/survey_record_generation>`_ 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_record_generation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions survey_record_generation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Survey record generation",
"summary": "Allow to create record of any model when user responds to a survey",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Elabore, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/survey",
"category": "",
"depends": ["survey"],
"data": [
"security/ir.model.access.csv",
"views/survey_survey_views.xml",
"views/survey_question_views.xml",
"views/survey_user_input_views.xml",
"views/survey_generated_record_views.xml",
],
"installable": True,
}
Loading

0 comments on commit 4903808

Please sign in to comment.