Overview
This example demonstrates building a customer portal that:- Displays customer orders and invoices from Odoo
- Shows account balance and payment history
- Allows customers to download invoices and documents
- Provides a secure, custom-branded interface
Prerequisites
- Odoo integration configured in HelloLeo
- Customer data in your Odoo instance
- Basic understanding of Odoo models (sale.order, account.move, res.partner)
Step-by-Step Guide
1. Set Up the Integration
First, ensure your Odoo integration is configured:- Go to Project Settings → Project Integrations
- Select Odoo and enter your credentials
- Test the connection
2. Create the Main Portal Page
Start by creating a dashboard that displays customer information:3. Display Orders List
Create a page to show all customer orders:4. Show Order Details
Create a detailed order view:5. Display Invoices
Create an invoices page:6. Add Invoice Download
Enable customers to download invoices:7. Create Account Summary
Add an account summary section:Example Prompts
Initial Setup
Enhancements
Key Odoo Models Used
- res.partner - Customer information
- sale.order - Sales orders
- account.move - Invoices and accounting entries
- sale.order.line - Order line items
Best Practices
- Security: Always filter data by customer partner ID to ensure customers only see their own data
- Performance: Use pagination for large lists of orders/invoices
- User Experience: Show loading states while fetching data from Odoo
- Error Handling: Display friendly error messages if Odoo connection fails
Next Steps
- Add payment integration (Stripe) to allow customers to pay invoices
- Create order tracking functionality
- Add document upload for customer documents
- Implement notifications for order status changes
