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
113 changes: 113 additions & 0 deletions survey_skip_start/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
=================
Survey Skip Start
=================

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

.. |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_skip_start
: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_skip_start
: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 allows to configure a survey to lead the users directly to
fill the form skipping the start screen.

**Table of contents**

.. contents::
:local:

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

Normally the screen start doesn't provide much value in regular surveys.

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

If you want to skip the start screen for a survey:

1. Go to *Surveys > Surveys* and choose the survey you want to
configure.
2. Go to the *Options* tab and in the *Questions* section set the *Skip
start screen* option on.

Usage
=====

Go to a survey which has the *Skip start screen* option set and you'll
be leaded directly to the form.

Known issues / Roadmap
======================

- For the moment, it only works with one page layouts.

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_skip_start%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

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_skip_start>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions survey_skip_start/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import controllers
from . import models
22 changes: 22 additions & 0 deletions survey_skip_start/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Survey Skip Start",
"summary": "Skip the surveys start screen and go directly to fill the form",
"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": [
"views/survey_survey_views.xml",
],
"assets": {
"web.assets_tests": [
"/survey_skip_start/static/tests/survey_skip_start_tour.esm.js",
],
},
}
1 change: 1 addition & 0 deletions survey_skip_start/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
10 changes: 10 additions & 0 deletions survey_skip_start/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.addons.survey.controllers.main import Survey


class Survey(Survey):
def _prepare_survey_data(self, survey_sudo, answer_sudo, **post):
survey_data = super()._prepare_survey_data(survey_sudo, answer_sudo, **post)
survey_data["skip_start"] = survey_sudo.skip_start
return survey_data
39 changes: 39 additions & 0 deletions survey_skip_start/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_skip_start
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-17 12:36+0000\n"
"Last-Translator: David Vidal <david.vidal@tecnativa.com>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: survey_skip_start
#: model:ir.model.fields,field_description:survey_skip_start.field_survey_survey__skip_start
msgid "Skip start screen"
msgstr "Saltar pantalla de inicio"

#. module: survey_skip_start
#: model:ir.model.fields,help:survey_skip_start.field_survey_survey__skip_start
msgid "Skip the start screen and go directly to the survey form"
msgstr ""
"Saltar la pantalla de inicio e ir directamente al formulario de la encuesta"

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

#, python-format
#~ msgid "The skip start screen option is only compatible with on page layouts"
#~ msgstr ""
#~ "La opción de saltar la pantalla de inicio en la encuesta solo es "
#~ "compatible con los diseños de una sola página"
32 changes: 32 additions & 0 deletions survey_skip_start/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_skip_start
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-05-13 09:24+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.10.4\n"

#. module: survey_skip_start
#: model:ir.model.fields,field_description:survey_skip_start.field_survey_survey__skip_start
msgid "Skip start screen"
msgstr "Salta schermata iniziale"

#. module: survey_skip_start
#: model:ir.model.fields,help:survey_skip_start.field_survey_survey__skip_start
msgid "Skip the start screen and go directly to the survey form"
msgstr "Salta la schermata iniziale e vai direttamente al modello sondaggio"

#. module: survey_skip_start
#: model:ir.model,name:survey_skip_start.model_survey_survey
msgid "Survey"
msgstr "Sondaggio"
29 changes: 29 additions & 0 deletions survey_skip_start/i18n/survey_skip_start.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_skip_start
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \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_skip_start
#: model:ir.model.fields,field_description:survey_skip_start.field_survey_survey__skip_start
msgid "Skip start screen"
msgstr ""

#. module: survey_skip_start
#: model:ir.model.fields,help:survey_skip_start.field_survey_survey__skip_start
msgid "Skip the start screen and go directly to the survey form"
msgstr ""

#. module: survey_skip_start
#: model:ir.model,name:survey_skip_start.model_survey_survey
msgid "Survey"
msgstr ""
1 change: 1 addition & 0 deletions survey_skip_start/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import survey_survey
21 changes: 21 additions & 0 deletions survey_skip_start/models/survey_survey.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2024 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models


class SurveySurvey(models.Model):
_inherit = "survey.survey"

skip_start = fields.Boolean(
string="Skip start screen",
help="Skip the start screen and go directly to the survey form",
)

def _create_answer(self, *args, **additional_vals):
"""The survey template checks the state of the inputs to show the start screen
or not. Setting the state we go directly to the form"""
inputs = super()._create_answer(*args, **additional_vals)
inputs.filtered(
lambda input: input.survey_id.skip_start and not input.is_session_answer
).state = "in_progress"
return inputs
3 changes: 3 additions & 0 deletions survey_skip_start/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
5 changes: 5 additions & 0 deletions survey_skip_start/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
If you want to skip the start screen for a survey:

1. Go to *Surveys > Surveys* and choose the survey you want to configure.
2. Go to the *Options* tab and in the *Questions* section set the *Skip start screen*
option on.
1 change: 1 addition & 0 deletions survey_skip_start/readme/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Normally the screen start doesn't provide much value in regular surveys.
3 changes: 3 additions & 0 deletions survey_skip_start/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Tecnativa](https://www.tecnativa.com)

- David Vidal
2 changes: 2 additions & 0 deletions survey_skip_start/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module allows to configure a survey to lead the users directly to fill the form
skipping the start screen.
1 change: 1 addition & 0 deletions survey_skip_start/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- For the moment, it only works with one page layouts.
2 changes: 2 additions & 0 deletions survey_skip_start/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Go to a survey which has the *Skip start screen* option set and you'll be leaded
directly to the form.
Binary file added survey_skip_start/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading