How to Leverage Portal Submit in Odoo 17 for Seamless Customer Interaction. Odoo is one of the most popular open-source ERP systems in the world, offering a vast array of modules that help businesses streamline their operations. One of the key features of Odoo is its customer portal, which allows customers to interact with the system, submit requests, view their orders, and manage invoices. In Odoo 17, Portal Submit functionality is enhanced to provide better user experience and automation.
In this article, we’ll dive into the Portal Submit functionality in Odoo 17, exploring how it works, its use cases, and provide a coding example to help you implement it in your Odoo instance.
Also Read:
- Best Advanced Zoho Partner In Pakistan Is FAIRCHANCE FOR CRM
- Handling Undefined Form Post in Odoo By FAIRCHANCE FOR CRM
- How to Link Only Specific Components to a Variant in Odoo
- Understanding Sale State Odoo Return By FAIRCHANCE FOR CRM
- Odoo Website Domain Setup By FAIRCHANCE FOR CRM
What is the Portal Submit in Odoo 17?
The Portal Submit feature allows customers or external users to interact with the system directly through the Odoo customer portal. It provides them with an easy interface to submit information, whether it’s a support request, a service inquiry, or feedback.
With Portal Submit, businesses can automate workflows such as:
- Submitting service requests or tickets
- Submitting product returns
- Filling out forms for custom orders
- Adding feedback or ratings
This feature improves the communication between the company and the customer while streamlining administrative tasks and reducing manual work.
Key Benefits of Portal Submit in Odoo 17
- Enhanced Customer Interaction: Customers can submit requests directly from the portal, making it easier for businesses to handle inquiries and support tickets.
- Improved Automation: Automates the processing of data submitted through the portal. This reduces manual input, improves workflow efficiency, and ensures that no request is missed.
- Real-Time Data Handling: Submissions are processed in real time, allowing immediate actions, such as creating support tickets or service orders.
- Customizable Forms: The Portal Submit feature in Odoo 17 is flexible, allowing businesses to create custom forms that align with their unique requirements.
- Transparency for Customers: Customers can track the status of their submissions, increasing transparency and satisfaction.
How Does Portal Submit in Odoo 17?
- User Registration: Users (typically customers) must be registered in the Odoo portal. They access the portal via their Odoo credentials.
- Form Submission: Once logged in, customers can fill out forms created by the business. These forms can be for any purpose, such as submitting tickets or sending custom requests.
- Data Handling: Once the form is submitted, Odoo processes the data. You can create workflows that automatically trigger actions like sending emails, creating records, or notifying relevant departments.
- Status Tracking: Customers can view the status of their submissions, track progress, and interact further if needed.
Implementing Portal Submit in Odoo 17: Code Example
To implement the Portal Submit functionality in Odoo 17, you’ll need to create a custom module that adds a form to the portal. Let’s walk through an example of a simple support ticket submission form.
Step 1: Create the Custom Module
First, create a custom module in your Odoo 17 instance. You can name the module portal_support_ticket
.
Create the necessary folder structure for your module:
/portal_support_ticket
/models
/views
/security
__init__.py
__manifest__.py
Step 2: Define the Model for the Ticket
In the /models
folder, create a file called portal_ticket.py
and define the model for the support ticket.
from odoo import models, fields, api
class SupportTicket(models.Model):
_name = ‘support.ticket’
_description = ‘Support Ticket’
name = fields.Char(string=“Ticket Title”, required=True)
description = fields.Text(string=“Description”, required=True)
customer_id = fields.Many2one(‘res.partner’, string=“Customer”, required=True)
status = fields.Selection([(‘new’, ‘New’), (‘in_progress’, ‘In Progress’), (‘resolved’, ‘Resolved’)], default=‘new’)
create_date = fields.Datetime(string=“Creation Date”, default=fields.Datetime.now)
@api.model
def create_ticket(self, name, description, customer_id):
“”” Create a new support ticket from the portal form “””
ticket = self.create({
‘name’: name,
‘description’: description,
‘customer_id’: customer_id.id
})
return ticket
Step 3: Create the Portal Form View
Next, define the form view in the /views
folder. Create a file called portal_ticket_view.xml
and add the following code:
<odoo>
<data>
<!– Portal Form View for Ticket Submission –><record id=“portal_ticket_form_view” model=“ir.ui.view”>
<field name=“name”>portal.ticket.form</field>
<field name=“model”>support.ticket</field>
<field name=“arch” type=“xml”>
<form>
<group>
<field name=“name”/>
<field name=“description”/>
</group>
<footer>
<button string=“Submit” type=“object” name=“action_submit_ticket” class=“btn-primary”/>
</footer>
</form>
</field>
</record>
<!– Portal Menu for Ticket Submission –>
<record id=“action_support_ticket_portal” model=“ir.actions.act_window”>
<field name=“name”>Submit Support Ticket</field>
<field name=“res_model”>support.ticket</field>
<field name=“view_mode”>form</field>
<field name=“context”>{‘default_customer_id’: user.partner_id.id}</field>
</record>
<!– Add Menu to Portal –>
<menuitem id=“menu_portal_support_ticket” name=“Submit Support Ticket” action=“action_support_ticket_portal”/>
</data>
</odoo>
Step 4: Define the Action and Button
In your portal_ticket.py
file, add a method to handle the form submission:
from odoo import models, fields
class SupportTicket(models.Model):
_name = ‘support.ticket’
# Other fields…
def action_submit_ticket(self):
“”” Create a ticket when the submit button is clicked from the portal form “””
self.create_ticket(self.name, self.description, self.customer_id)
return {
‘type’: ‘ir.actions.act_window’,
‘res_model’: ‘support.ticket’,
‘view_mode’: ‘form’,
‘res_id’: self.id,
‘target’: ‘new’
}
Step 5: Add Access Rights and Security
Ensure that the customer has access to the portal form. Define access rights in the /security/ir.model.access.csv
file:
access_support_ticket_portal_user,support.ticket.portal.user,model_support_ticket,base.group_portal,1,1,1,1
This will grant the portal users the ability to access and submit the support ticket form.
Conclusion
The Portal Submit in Odoo 17 allows businesses to efficiently collect information from their customers, automate processes, and enhance communication. By creating custom modules and forms, you can tailor this feature to suit any business need. The example above demonstrates a simple implementation of a support ticket submission form that integrates seamlessly with Odoo’s portal.
With these features, Odoo 17 continues to deliver exceptional flexibility and power, helping businesses automate workflows and provide better services to their customers.
For more information about Portal Submit in Odoo 17, visit this link.
If you want to Free Trail Zoho, click on this link.