diff --git a/survey_contact_generation/README.rst b/survey_contact_generation/README.rst index d844769c..fb64e4b5 100644 --- a/survey_contact_generation/README.rst +++ b/survey_contact_generation/README.rst @@ -17,13 +17,13 @@ Survey contacts generation :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/15.0/survey_contact_generation + :target: https://github.com/OCA/survey/tree/16.0/survey_contact_generation :alt: OCA/survey .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/survey-15-0/survey-15-0-survey_contact_generation + :target: https://translation.odoo-community.org/projects/survey-16-0/survey-16-0-survey_contact_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=15.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/survey&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -65,7 +65,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -107,6 +107,6 @@ Current `maintainer `__: |maintainer-chienandalu| -This module is part of the `OCA/survey `_ project on GitHub. +This module is part of the `OCA/survey `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/survey_contact_generation/__manifest__.py b/survey_contact_generation/__manifest__.py index 7ac19ec6..adb0ab79 100644 --- a/survey_contact_generation/__manifest__.py +++ b/survey_contact_generation/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Survey contacts generation", "summary": "Generate new contacts from surveys", - "version": "15.0.1.1.2", + "version": "16.0.1.1.2", "development_status": "Beta", "category": "Marketing/Survey", "website": "https://github.com/OCA/survey", diff --git a/survey_contact_generation/demo/survey_contact_generation_demo.xml b/survey_contact_generation/demo/survey_contact_generation_demo.xml index b01dd4fe..833fd07c 100644 --- a/survey_contact_generation/demo/survey_contact_generation_demo.xml +++ b/survey_contact_generation/demo/survey_contact_generation_demo.xml @@ -5,6 +5,7 @@ Contact Creation Survey 80e5f1e2-1a9d-4c51-8e23-09e93f7fa2c5 public + one_page diff --git a/survey_contact_generation/static/description/index.html b/survey_contact_generation/static/description/index.html index c4d8938c..8ac9c6f6 100644 --- a/survey_contact_generation/static/description/index.html +++ b/survey_contact_generation/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,7 +369,7 @@

Survey contacts generation

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:986cee374f71c937639568c28530ff9e575ae48f8a880620c5d8698ca355632c !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/survey Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/survey Translate me on Weblate Try me on Runboat

This module allows to generate new contacts from surveys answers.

Table of contents

@@ -412,7 +413,7 @@

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

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

@@ -437,13 +438,15 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

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.

Current maintainer:

chienandalu

-

This module is part of the OCA/survey project on GitHub.

+

This module is part of the OCA/survey project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/survey_contact_generation/tests/__init__.py b/survey_contact_generation/tests/__init__.py index d4c56fbb..d91c9bb2 100644 --- a/survey_contact_generation/tests/__init__.py +++ b/survey_contact_generation/tests/__init__.py @@ -1 +1,2 @@ from . import test_survey_contact_generation +from . import test_survey_question diff --git a/survey_contact_generation/tests/test_survey_question.py b/survey_contact_generation/tests/test_survey_question.py new file mode 100644 index 00000000..a59c1ac9 --- /dev/null +++ b/survey_contact_generation/tests/test_survey_question.py @@ -0,0 +1,70 @@ +from odoo.addons.survey.tests.common import SurveyCase + + +class TestSurveyQuestion(SurveyCase): + def setUp(self): + super().setUp() + self.char_box_survey_question = self.env["survey.question"].create( + { + "title": "CharBox Question", + "question_type": "char_box", + } + ) + self.text_box_survey_question = self.env["survey.question"].create( + { + "title": "TextBox Question", + "question_type": "text_box", + } + ) + self.multiple_choice_survey_question = self.env["survey.question"].create( + { + "title": "MultipleChoice Question", + "question_type": "multiple_choice", + } + ) + + def test_compute_allowed_field_ids(self): + self.char_box_survey_question._compute_allowed_field_ids() + char_box_allowed_field_ids = self.char_box_survey_question.allowed_field_ids.ids + char_box_expected_field_ids = ( + self.env["ir.model.fields"] + .search( + [ + ("model", "=", "res.partner"), + ("ttype", "in", ["char", "text"]), + ] + ) + .ids + ) + self.text_box_survey_question._compute_allowed_field_ids() + text_box_allowed_field_ids = self.text_box_survey_question.allowed_field_ids.ids + text_box_expected_field_ids = ( + self.env["ir.model.fields"] + .search( + [ + ("model", "=", "res.partner"), + ("ttype", "=", "html"), + ] + ) + .ids + ) + self.multiple_choice_survey_question._compute_allowed_field_ids() + multiple_choice_allowed_field_ids = ( + self.multiple_choice_survey_question.allowed_field_ids.ids + ) + multiple_choice_expected_field_ids = ( + self.env["ir.model.fields"] + .search( + [ + ("model", "=", "res.partner"), + ("ttype", "in", ["many2many", "html", "char"]), + ] + ) + .ids + ) + + self.assertEqual(char_box_allowed_field_ids, char_box_expected_field_ids) + self.assertEqual(text_box_allowed_field_ids, text_box_expected_field_ids) + self.assertEqual( + multiple_choice_allowed_field_ids, multiple_choice_expected_field_ids + ) diff --git a/survey_contact_generation/views/survey_survey_views.xml b/survey_contact_generation/views/survey_survey_views.xml index 60b96c08..4dc0b576 100644 --- a/survey_contact_generation/views/survey_survey_views.xml +++ b/survey_contact_generation/views/survey_survey_views.xml @@ -2,7 +2,7 @@ survey.survey - +