Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

Associate surveys with specific objects

Naroči se

Get notified when there's activity on this post

This question has been flagged
surveys
3 Odgovori
6191 Prikazi
Avatar
Javier Macchi

I am working with the Surveys module in Odoo v14, and it seems to be powerful enough to design different questionaires to be used in many different situations... for example to send it to clients to ask for their satisfaction about a given product or service, or to a candidate that has applied for a job to ask them detailed questions about their previous experience.

The problem I'm facing is how to associate those survey responses to the object that originated them, for example if I send the satisfaction survey to a given customer, I want to be able to see that survey response from the client record. Or if I send the previous experience survey to a candidate, I want to access it from the candidate record.

Currently I can only access the surveys from the surveys module, and have to manually search for the specific survey response I want to find, which is highly inefficient and also lacks any traceability and direct link to the original object. Has anybody faced this situation and has found a solution or workaround for this problem?

Any ideas are appreciated, thanks!

1
Avatar
Opusti
Avatar
Samuel Moguilner
Best Answer

Is it possible to implement this functionality even if the user is not logged in? If I collect email addresses through the survey, is there a method to match these emails with the corresponding contacts? Thanks in advance!

1
Avatar
Opusti
Avatar
XOLUTO
Best Answer

Answer above only covers use cases when survey is related to a user.

But in real life you want to relate survey results to products, affiliates, partners, ... 

In my case I have service tasks to assess partners, doing a supplier audit/assessment.

So you have somehow relate the survey to a particular partner and their products, which is not supported out of the box.

The approach I've implemented in odoo is outlined as follows

  • Inherit Controller to write related business object info)
  • In calling the  survey (URL-Action) pass the context (related business object info)
  • Inherited Controller process the context and add it to survey.user_input

Custom Controller

Important here: add an additional parameter, in my case task_id

The clue is to pass your context info in the additional_vals which are then evaluated and written by default to the survey.user_input.

You have to inherit of course the according to your needs.

class SurveyController(Survey):        
​@http.route('/survey/start/', type='http', auth='public', ​website=True)   
def survey_start(self, survey_token, answer_token=None, email=False, task_id=None,**post):
    ​ ​# the clue, add additional_vals, which are then written to the survey anser       
​ ​additional_vals = {} # f
​ ​if task_id:           
​ ​ ​reffering_task = request.env['project.task'].sudo().search([
​ ​ ​ ​('id', '=', task_id)], limit=1)           
​ ​ ​additional_vals = {'my_partner_id': reffering_task.partner_id.id,
​ ​ ​ 'my_standard_id': reffering_task.standard_id.id                    # rest of the controller remain unchanged
​....

Call Survey:

Survey is called by url action. you have to add your context info (in my case task_id) to be evaluated be the survey controller start (see above)

...
   self.ensure_one()       
​url = '%s?%s' % (self.get_start_url(), werkzeug.urls.url_encode(
​ ​{'answer_token': answer and answer.access_token or None,
​ ​'task_id': self.id}))  # open via URL-Action       
​return {
​ ​'type': 'ir.actions.act_url',
​​'name': "Start Survey", 
​ ​'target': 'new', 
​ ​'url': url       
​}
0
Avatar
Opusti
Avatar
Ray Carnes (ray)
Best Answer

Since the Customer is a Contact in Odoo (res.partner records) you can use Odoo Studio to create a smart button to access all responses, because the partner_id field is already on the Survey Response (if the Customer is logged in when they reply).

First, create a field on the Contact to link to the Survey Responses:



Next, use Odoo Studio to create the Smart Button:







Once you send a Survey and receive a response, you will see them from the Contact record.


0
Avatar
Opusti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Survey Visual Changes Possible?
surveys
Avatar
Avatar
Avatar
2
mar. 24
4239
Survey for Events, Odoo 15
surveys
Avatar
0
sep. 23
1890
Duplicate question in surveys Solved
surveys
Avatar
Avatar
Avatar
2
maj 23
2743
survey results
surveys
Avatar
Avatar
1
dec. 20
4386
print survey Solved
surveys
Avatar
Avatar
Avatar
2
okt. 20
4302
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now