Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Отримати демо
  • Ціни
  • Допомога

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

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

Associate surveys with specific objects

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
surveys
3 Відповіді
6184 Переглядів
Аватар
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
Аватар
Відмінити
Аватар
Samuel Moguilner
Найкраща відповідь

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
Аватар
Відмінити
Аватар
XOLUTO
Найкраща відповідь

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
Аватар
Відмінити
Аватар
Ray Carnes (ray)
Найкраща відповідь

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
Аватар
Відмінити
Enjoying the discussion? Don't just read, join in!

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

Реєстрація
Related Posts Відповіді Переглядів Дія
Survey Visual Changes Possible?
surveys
Аватар
Аватар
Аватар
2
бер. 24
4236
Survey for Events, Odoo 15
surveys
Аватар
0
вер. 23
1881
Duplicate question in surveys Вирішено
surveys
Аватар
Аватар
Аватар
2
трав. 23
2740
survey results
surveys
Аватар
Аватар
1
груд. 20
4381
print survey Вирішено
surveys
Аватар
Аватар
Аватар
2
жовт. 20
4295
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة 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 - це набір програм для роботи з відкритим кодом, які охоплюють всі ваші потреби компанії: CRM, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція Odoo - це одночасно дуже проста у використанні та повністю інтегрована.

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