Skip to content

Commit 317abd9

Browse files
author
David
committed
[ADD] survey_skip_start: New module
This module allows to configure a survey to lead the users directly to fill the form skipping the start screen. TT47045
1 parent 5b17547 commit 317abd9

20 files changed

+724
-0
lines changed
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../survey_skip_start

Diff for: setup/survey_skip_start/setup.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)

Diff for: survey_skip_start/README.rst

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
=================
2+
Survey Skip Start
3+
=================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:94c8688a10a8c87ee2f5146bcca3100f45f5d87d2171f34929951f12e699a31a
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/15.0/survey_skip_start
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-15-0/survey-15-0-survey_skip_start
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=15.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows to configure a survey to lead the users directly to
32+
fill the form skipping the start screen.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Use Cases / Context
40+
===================
41+
42+
Normally the screen start doesn't provide much value in regular surveys.
43+
44+
Configuration
45+
=============
46+
47+
If you want to skip the start screen for a survey:
48+
49+
1. Go to *Surveys > Surveys* and choose the survey you want to
50+
configure.
51+
2. Go to the *Options* tab and in the *Questions* section set the *Skip
52+
start screen* option on.
53+
54+
Usage
55+
=====
56+
57+
Go to a survey which has the *Skip start screen* option set and you'll
58+
be leaded directly to the form.
59+
60+
Bug Tracker
61+
===========
62+
63+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/survey/issues>`_.
64+
In case of trouble, please check there if your issue has already been reported.
65+
If you spotted it first, help us to smash it by providing a detailed and welcomed
66+
`feedback <https://github.com/OCA/survey/issues/new?body=module:%20survey_skip_start%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
67+
68+
Do not contact contributors directly about support or help with technical issues.
69+
70+
Credits
71+
=======
72+
73+
Authors
74+
-------
75+
76+
* Tecnativa
77+
78+
Contributors
79+
------------
80+
81+
- `Tecnativa <https://www.tecnativa.com>`__
82+
83+
- David Vidal
84+
85+
Maintainers
86+
-----------
87+
88+
This module is maintained by the OCA.
89+
90+
.. image:: https://odoo-community.org/logo.png
91+
:alt: Odoo Community Association
92+
:target: https://odoo-community.org
93+
94+
OCA, or the Odoo Community Association, is a nonprofit organization whose
95+
mission is to support the collaborative development of Odoo features and
96+
promote its widespread use.
97+
98+
.. |maintainer-chienandalu| image:: https://github.com/chienandalu.png?size=40px
99+
:target: https://github.com/chienandalu
100+
:alt: chienandalu
101+
102+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
103+
104+
|maintainer-chienandalu|
105+
106+
This module is part of the `OCA/survey <https://github.com/OCA/survey/tree/15.0/survey_skip_start>`_ project on GitHub.
107+
108+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Diff for: survey_skip_start/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import controllers
2+
from . import models

Diff for: survey_skip_start/__manifest__.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2024 Tecnativa - David Vidal
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Survey Skip Start",
5+
"summary": "Skip the surveys start screen and go directly to fill the form",
6+
"version": "15.0.1.0.0",
7+
"development_status": "Beta",
8+
"category": "Marketing/Survey",
9+
"website": "https://github.com/OCA/survey",
10+
"author": "Tecnativa, Odoo Community Association (OCA)",
11+
"maintainers": ["chienandalu"],
12+
"license": "AGPL-3",
13+
"depends": ["survey"],
14+
"data": [
15+
"views/survey_survey_views.xml",
16+
"views/survey_templates.xml",
17+
],
18+
"assets": {
19+
"web.assets_tests": [
20+
"/survey_skip_start/static/tests/survey_skip_start_tour.esm.js",
21+
],
22+
},
23+
}

Diff for: survey_skip_start/controllers/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import main

Diff for: survey_skip_start/controllers/main.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright 2024 Tecnativa - David Vidal
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
from odoo.addons.survey.controllers.main import Survey
4+
5+
6+
class Survey(Survey):
7+
def _prepare_survey_data(self, survey_sudo, answer_sudo, **post):
8+
survey_data = super()._prepare_survey_data(survey_sudo, answer_sudo, **post)
9+
survey_data["skip_start"] = survey_sudo.skip_start
10+
return survey_data

Diff for: survey_skip_start/models/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import survey_survey

Diff for: survey_skip_start/models/survey_survey.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2024 Tecnativa - David Vidal
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
from odoo import fields, models
4+
5+
6+
class SurveySurvey(models.Model):
7+
_inherit = "survey.survey"
8+
9+
skip_start = fields.Boolean(
10+
string="Skip start screen",
11+
help="Skip the start screen and go directly to the survey form",
12+
)

Diff for: survey_skip_start/readme/CONFIGURE.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
If you want to skip the start screen for a survey:
2+
3+
1. Go to *Surveys > Surveys* and choose the survey you want to configure.
4+
2. Go to the *Options* tab and in the *Questions* section set the *Skip start screen*
5+
option on.

Diff for: survey_skip_start/readme/CONTEXT.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Normally the screen start doesn't provide much value in regular surveys.

Diff for: survey_skip_start/readme/CONTRIBUTORS.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- [Tecnativa](https://www.tecnativa.com)
2+
3+
- David Vidal

Diff for: survey_skip_start/readme/DESCRIPTION.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This module allows to configure a survey to lead the users directly to fill the form
2+
skipping the start screen.

Diff for: survey_skip_start/readme/USAGE.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Go to a survey which has the *Skip start screen* option set and you'll be leaded
2+
directly to the form.

0 commit comments

Comments
 (0)