Skip to content

Commit e8236de

Browse files
committed
[NEW] survey_record_generation
1 parent 75efb58 commit e8236de

27 files changed

+2155
-0
lines changed
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
========================
2+
Survey record generation
3+
========================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:03eeb5c11b7d8330051c416331c84103b2641351fdc1d0a1bad43acd09501a33
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsurvey-lightgray.png?logo=github
20+
:target: https://github.com/OCA/survey/tree/16.0/survey_record_generation
21+
:alt: OCA/survey
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/survey-16-0/survey-16-0-survey_record_generation
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/survey&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows to generate any record from surveys answers.
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Use Cases / Context
39+
===================
40+
41+
In several cases we want to use survey application to create records.
42+
Website form application give the same possibility but the design is integrated on the web site.
43+
Futhermore this module add other functionnalities like "duplicate" check, or creation of several interconnected records
44+
45+
Typical use case : Information request form
46+
47+
#. Submitting the form will create a contact (partner) only if it does not already exist in the database.
48+
#. Submitting the form will also create a crm opportunity linked to previously created partner
49+
50+
51+
52+
Configuration
53+
=============
54+
55+
Record generation configuration
56+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57+
58+
.. |Image of record creation list| image:: https://raw.githubusercontent.com/OCA/survey/16.0/survey_record_generation/static/description/record-creations.png
59+
60+
#. Go to the the survey
61+
#. In *Record creation* tab add a new line
62+
#. Set a name for created record, select the Model of the record (eg: Prospect)
63+
#. Add a field configuration. So for each field :
64+
65+
.. |Image of record creation fields| image:: https://raw.githubusercontent.com/OCA/survey/16.0/survey_record_generation/static/description/record-creation-customer.png
66+
67+
#. You can check "unicity constraint" to prevent duplicates.
68+
In case of duplicates and if other record use this record to fill a m2o field, the founded record will be used
69+
#. You can configure explicitly where Odoo should retrieve the value of field :
70+
* **fixed**: To set explicit value
71+
* **question**: If value come from user's answer
72+
For m2o or m2m links, question should be configured before. See Question answers configuration section below.
73+
* **other created record**: If value come from other created record (m2o case only)
74+
75+
76+
77+
Question answers configuration
78+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79+
80+
In a survey question : to configure value of choices
81+
82+
.. |Question answers| image:: https://raw.githubusercontent.com/OCA/survey/16.0/survey_record_generation/static/description/question-answers.png
83+
84+
#. Configure a multiple choice question
85+
#. Select value type associated to answer:
86+
* **Value** > eg: to fill a selection field
87+
* **Record** > to fill m2o or m2m field
88+
#. In case of *record* type:
89+
#. Select referenced model
90+
#. You can directly fill answers (eventualy with help of the domain field)
91+
#. Or create new answers and set associated record
92+
#. In case of *value* type:
93+
#. Add new selectable answers and set associated value
94+
95+
96+
Usage
97+
=====
98+
99+
When a survey is properly configured, once it is submited by a user, records should be created.
100+
101+
To find records generated from a participation go to:
102+
103+
#. Survey > participation
104+
#. Click on **# Generated records** button (top-right)
105+
106+
Bug Tracker
107+
===========
108+
109+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/survey/issues>`_.
110+
In case of trouble, please check there if your issue has already been reported.
111+
If you spotted it first, help us to smash it by providing a detailed and welcomed
112+
`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**>`_.
113+
114+
Do not contact contributors directly about support or help with technical issues.
115+
116+
Credits
117+
=======
118+
119+
Authors
120+
~~~~~~~
121+
122+
* Elabore
123+
124+
Contributors
125+
~~~~~~~~~~~~
126+
127+
* `Elabore <https://www.elabore.coop>`_
128+
129+
* Clément Thomas
130+
131+
Maintainers
132+
~~~~~~~~~~~
133+
134+
This module is maintained by the OCA.
135+
136+
.. image:: https://odoo-community.org/logo.png
137+
:alt: Odoo Community Association
138+
:target: https://odoo-community.org
139+
140+
OCA, or the Odoo Community Association, is a nonprofit organization whose
141+
mission is to support the collaborative development of Odoo features and
142+
promote its widespread use.
143+
144+
This module is part of the `OCA/survey <https://github.com/OCA/survey/tree/16.0/survey_record_generation>`_ project on GitHub.
145+
146+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
2+
3+
{
4+
"name": "Survey record generation",
5+
'summary': 'Allow to create record of any model when sending the form',
6+
'description': """
7+
Allow to create record of any model when sending the form :
8+
----------------------------------------------------
9+
* Choose list of models created on survey submission
10+
* Set default values for record created
11+
* Associate question with fields
12+
* For x2m fields : Associate values to questions
13+
""",
14+
"version": "16.0.1.0.0",
15+
"license": "AGPL-3",
16+
"author": "Elabore",
17+
"website": "https://www.elabore.coop",
18+
"category": "",
19+
"depends": ["survey"],
20+
"data": [
21+
"security/ir.model.access.csv",
22+
"views/survey_survey_views.xml",
23+
"views/survey_question_views.xml",
24+
"views/survey_user_input_views.xml",
25+
"views/survey_generated_record_views.xml",
26+
],
27+
"installable": True,
28+
}

0 commit comments

Comments
 (0)