Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] survey_contact_generation: Migration to 16.0 #140

Open
wants to merge 30 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1603581
[ADD] survey_contact_generation: New module
chienandalu Jun 1, 2023
0af8da0
[IMP] survey_contact_generation: Add test coverage
stefan-tecnativa Jun 14, 2023
5e5f29d
[IMP] survey_contact_generation: pre-commit stuff
stefan-tecnativa Jun 15, 2023
b1b59eb
[MIG] survey_contact_generation: Migration to 15.0
stefan-tecnativa Jun 15, 2023
4fcd087
[IMP] survey_contact_generation: multiple choice
chienandalu Jun 20, 2023
8b4ca42
[IMP] survey_contact_generation: Improve test coverage
stefan-tecnativa Jun 22, 2023
75d5466
[FIX] survey_contact_generation: Multiple choices text answers were
stefan-tecnativa Jun 22, 2023
b37705a
[UPD] Update survey_contact_generation.pot
Aug 8, 2023
71f598d
[UPD] README.rst
OCA-git-bot Aug 8, 2023
525c252
Update translation files
weblate Aug 8, 2023
41b5e9c
[UPD] README.rst
OCA-git-bot Sep 3, 2023
8e276f8
Added translation using Weblate (Italian)
mymage Oct 27, 2023
83dfb00
Translated using Weblate (Italian)
mymage Oct 29, 2023
ef8b67c
Translated using Weblate (Spanish)
Ivorra78 Nov 11, 2023
b73684d
[IMP] survey_contact_generation: parent company
chienandalu Feb 8, 2024
cd80ba3
[UPD] Update survey_contact_generation.pot
Feb 9, 2024
6554b6e
[BOT] post-merge updates
OCA-git-bot Feb 9, 2024
13794ce
Update translation files
weblate Feb 9, 2024
a89ceac
Translated using Weblate (Italian)
mymage Feb 12, 2024
05b7d2c
[IMP] survey_contact_generation: link partner
chienandalu Feb 13, 2024
073a0c0
[UPD] Update survey_contact_generation.pot
Feb 13, 2024
de83cd7
[BOT] post-merge updates
OCA-git-bot Feb 13, 2024
8e05d4c
Update translation files
weblate Feb 13, 2024
ab7d601
Translated using Weblate (Italian)
mymage Feb 26, 2024
1a10cf1
[IMP] survey_contact_generation: partner hook method
chienandalu Mar 14, 2024
ddb0d29
[BOT] post-merge updates
OCA-git-bot Mar 15, 2024
31c8822
[IMP] survey_contact_generation: email case match
chienandalu Apr 22, 2024
975a116
[BOT] post-merge updates
OCA-git-bot Apr 22, 2024
c8d9782
[IMP] survey_contact_generation: pre-commit stuff
arielbarreiros96 Dec 26, 2024
0ccf6c8
[MIG] survey_contact_generation: Migration to 16.0
arielbarreiros96 Dec 26, 2024
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
6 changes: 6 additions & 0 deletions setup/survey_contact_generation/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
112 changes: 112 additions & 0 deletions survey_contact_generation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
==========================
Survey contacts generation
==========================

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

.. |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_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-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=16.0
:alt: Try me on Runboat

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

This module allows to generate new contacts from surveys answers.

**Table of contents**

.. contents::
:local:

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

To configure the contact generation:

#. Go to the configured survey.
#. In the *Contact* section of the *Options* tab, set
*Generate Contact* on, if you want contacts to be
generated from the answers to this survey.
#. If you want the generated to have a parent company, set the option
*Create Parent Contact* and link the `company_name` field to a question in the
survey.
#. In each question associated with a future new contact,
specify the corresponding contact field. To do this,
go to the 'Options' tab, then navigate to the 'Contact' group,
and select the 'Contact field' field.

Usage
=====

if the survey is properly configured, once it is submited
by an anonomous user, a new contact is create or an
existing one is linked.

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_contact_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
~~~~~~~

* Tecnativa

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

* `Tecnativa <https://www.tecnativa.com>`_

* David Vidal
* Ernesto Tejeda
* Stefan Ungureanu

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-chienandalu| image:: https://github.com/chienandalu.png?size=40px
:target: https://github.com/chienandalu
:alt: chienandalu

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-chienandalu|

This module is part of the `OCA/survey <https://github.com/OCA/survey/tree/16.0/survey_contact_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_contact_generation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
24 changes: 24 additions & 0 deletions survey_contact_generation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2023 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Survey contacts generation",
"summary": "Generate new contacts from surveys",
"version": "16.0.1.1.2",
"development_status": "Beta",
"category": "Marketing/Survey",
"website": "https://github.com/OCA/survey",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["chienandalu"],
"license": "AGPL-3",
"depends": ["survey"],
"data": [
"views/survey_question_views.xml",
"views/survey_survey_views.xml",
],
"demo": ["demo/survey_contact_generation_demo.xml"],
"assets": {
"web.assets_tests": [
"/survey_contact_generation/static/tests/survey_contact_generation_tour.js",
],
},
}
110 changes: 110 additions & 0 deletions survey_contact_generation/demo/survey_contact_generation_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Survey-->
<record model="survey.survey" id="survey_contact_creation">
<field name="title">Contact Creation Survey</field>
<field name="access_token">80e5f1e2-1a9d-4c51-8e23-09e93f7fa2c5</field>
<field name="access_mode">public</field>
<field name="questions_layout">one_page</field>
<field name="users_can_go_back" eval="True" />
<field name="generate_contact" eval="True" />
<field name="create_parent_contact" eval="True" />
</record>
<record model="survey.question" id="survey_contact_q_company_name">
<field name="survey_id" ref="survey_contact_creation" />
<field name="sequence">0</field>
<field name="title">Company name</field>
<field name="question_type">char_box</field>
<field name="constr_mandatory" eval="True" />
<field name="res_partner_field" ref="base.field_res_partner__company_name" />
</record>
<record model="survey.question" id="survey_contact_q0">
<field name="survey_id" ref="survey_contact_creation" />
<field name="sequence">0</field>
<field name="title">Name</field>
<field name="question_type">char_box</field>
<field name="constr_mandatory" eval="True" />
<field name="res_partner_field" ref="base.field_res_partner__name" />
</record>
<record model="survey.question" id="survey_contact_q1">
<field name="survey_id" ref="survey_contact_creation" />
<field name="sequence">1</field>
<field name="title">Email</field>
<field name="question_type">char_box</field>
<field name="res_partner_field" ref="base.field_res_partner__email" />
</record>
<record model="survey.question" id="survey_contact_q2">
<field name="survey_id" ref="survey_contact_creation" />
<field name="sequence">2</field>
<field name="title">Notes</field>
<field name="question_type">text_box</field>
<field name="res_partner_field" ref="base.field_res_partner__comment" />
</record>
<record model="survey.question" id="survey_contact_q3">
<field name="survey_id" ref="survey_contact_creation" />
<field name="sequence">3</field>
<field name="title">Color</field>
<field name="question_type">numerical_box</field>
<field name="res_partner_field" ref="base.field_res_partner__color" />
</record>
<record model="survey.question" id="survey_contact_q4">
<field name="survey_id" ref="survey_contact_creation" />
<field name="sequence">4</field>
<field name="title">Date</field>
<field name="question_type">date</field>
<field name="res_partner_field" ref="base.field_res_partner__date" />
</record>
<record model="survey.question" id="survey_contact_q5">
<field name="survey_id" ref="survey_contact_creation" />
<field name="sequence">4</field>
<field name="title">Country</field>
<field name="question_type">simple_choice</field>
<field name="res_partner_field" ref="base.field_res_partner__country_id" />
</record>
<record model="survey.question.answer" id="survey_contact_q5_sug1">
<field name="question_id" ref="survey_contact_q5" />
<field name="sequence">1</field>
<field name="value">Spain</field>
<field name="res_partner_field_resource_ref" ref="base.es" />
</record>
<record model="survey.question.answer" id="survey_contact_q5_sug2">
<field name="question_id" ref="survey_contact_q5" />
<field name="sequence">2</field>
<field name="value">Romania</field>
<field name="res_partner_field_resource_ref" ref="base.ro" />
</record>
<record model="survey.question" id="survey_contact_q6">
<field name="survey_id" ref="survey_contact_creation" />
<field name="sequence">4</field>
<field name="title">Tags</field>
<field name="question_type">multiple_choice</field>
<field name="res_partner_field" ref="base.field_res_partner__category_id" />
</record>
<record model="survey.question.answer" id="survey_contact_q6_sug1">
<field name="question_id" ref="survey_contact_q6" />
<field name="sequence">1</field>
<field name="value">Vendor</field>
<field
name="res_partner_field_resource_ref"
ref="base.res_partner_category_0"
/>
</record>
<record model="survey.question.answer" id="survey_contact_q6_sug2">
<field name="question_id" ref="survey_contact_q6" />
<field name="sequence">2</field>
<field name="value">Prospects</field>
<field
name="res_partner_field_resource_ref"
ref="base.res_partner_category_2"
/>
</record>
<record model="survey.question.answer" id="survey_contact_q6_sug3">
<field name="question_id" ref="survey_contact_q6" />
<field name="sequence">3</field>
<field name="value">Employees</field>
<field
name="res_partner_field_resource_ref"
ref="base.res_partner_category_3"
/>
</record>
</odoo>
Loading
Loading