تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
1692 أدوات العرض

Hi!


This is my first post! I hope that there is someone helpful.

Together with the team, we need to create on the website of our Odoo instance (Community version) a form (e.g. using Formio - Forms App), but we have a problem. We need to send information after the user completed the form to the external application on another server (the old CRM system that our sales director does not want to give up). But we have no idea how to do it, because there is no documentation to Formio when it comes to this issue. We don't want to save those data on the Odoo instance database, we need just to transfer them directly.


Can someone guide us? Any links to documentation? Tutorial?


Why we need this and how this have to work:

  1. User fills form at the company odoo website,
  2. He need to give some answers: name, surname, company name, pick the range of products that he want to order from the list and the project name,
  3. These data we need to send to our old CRM, so our CRM verify if the user is a Value added reseller and if he is and has been our trusted customer - send notification with those data to our boss who is taking care of this kind of clients by himself.
الصورة الرمزية
إهمال
الكاتب

Pulling up.

الكاتب أفضل إجابة

Thank you for your help!


I apologize for the long response time, I forwarded your message to my teammates and the topic went quiet for a while.


It turns out that your solution was so good and effective, and most importantly - easy to implement, that the team decided to transfer our entire company system to Odoo :)


They have been learning the software for a few months now.


There are also plans to launch Odoo as a heavily modified SaaS platform, we will soon start looking for collaborators to develop the platform. Would you like to help us with this? :)


Unfortunately, I do not have the right karma to write to you directly, how could we get in touch?

الصورة الرمزية
إهمال
أفضل إجابة

Hello Terremagenta,

To achieve this flow in Odoo, follow these simplified steps:

1. Create a Web Form:
  • Build a form on your Odoo website where users fill in their name, surname, company name, product range, and project name.
  • Use Odoo Studio or Website > Forms to create this form or you can do the same from backend.
2. Capture Data & Process It:
  • Create a custom controller to handle the form submission, which captures the data and sends it to your old CRM for verification.

Example Controller:

from odoo import http
from odoo.http import request
import json

class WebsiteFormController(http.Controller):
    @http.route(['/submit_reseller_form'], type='http', auth="public", website=True)
    def submit_reseller_form(self, **post):
        data_to_crm = {
            'name': post.get('name'),
            'surname': post.get('surname'),
            'company_name': post.get('company_name'),
            'product_range': post.get('product_range'),
            'project_name': post.get('project_name')
        }
        response = self.send_data_to_crm(data_to_crm)
        if response.get('is_verified'):
            self.notify_boss(data_to_crm, "boss@example.com")
        return request.render('your_module.form_success_template')

    def send_data_to_crm(self, data):
        crm_api_url = "https://your-crm-url.com/verify_reseller"
        response = requests.post(crm_api_url, json=data)
        return response.json()

    def notify_boss(self, data, boss_email):
        template = request.env.ref('your_module.email_template_notify_boss')
        template.sudo().send_mail(request.uid, email_values={'email_to': boss_email})
3. Send Data to CRM:
  • The controller sends the form data to your CRM (via API).
  • Your CRM verifies if the user is a trusted reseller.
4. Notify the Boss:
  • If the CRM verifies the reseller, send an email notification to the boss using an email template.

Example Email Template:

This approach simplifies the entire process. Let me know if it helps :)

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أغسطس 16
3739
1
يوليو 15
4048
0
نوفمبر 24
969
0
يوليو 20
3001
0
يونيو 15
3541