Odoo Vendor Registration self-updates
Integrates WordPress with Odoo for vendor registration and management
by Mohamad Nagi · github.com/mohamadnagi/wordpress-odoo-integration-plugin · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mohamadnagi/wordpress-odoo-integration-plugin/archive/refs/heads/main.zipShips its own WordPress updater (built-in updater), so new versions show up under Dashboard → Updates.
Odoo Vendor Registration - WordPress Plugin
A powerful WordPress plugin that seamlessly integrates with Odoo ERP for vendor registration, customer management, and lead generation. Perfect for businesses looking to streamline their vendor onboarding and customer inquiry processes.
🌟 Key Features
📋 Vendor Registration System
- Public registration forms with customizable shortcodes
- Admin approval workflow with manual sync controls
- Email notifications to vendors upon registration
- Vendor directory integration ready
- Duplicate prevention with email validation
👥 Automatic User Synchronization
- Auto-sync WordPress users to Odoo as customers
- Profile update sync - changes reflect in Odoo
- Bulk sync existing users with one click
- Manual sync options for individual users
- Sync status tracking in admin dashboard
💼 Lead & Interest Management
- Customer interest forms for product/service inquiries
- Login-required lead submission for verified customers
- Vendor selection from registered vendors
- Priority levels (Low, Normal, High, Urgent)
- Date tracking with expected delivery dates
- Automatic CRM sync to Odoo leads/opportunities
🎨 Modern Bootstrap 5 UI
- Beautiful gradient designs for both forms
- Fully responsive - works on all devices
- Bootstrap Icons for enhanced visual appeal
- Smooth animations and transitions
- Custom color schemes easily customizable
- Dark mode support (optional)
⚙️ Admin Dashboard
- Centralized settings for Odoo connection
- Connection testing tool
- Vendor submissions table with sync status
- User sync management with status tracking
- Lead submissions viewer with details
- Manual sync buttons for failed submissions
🔒 Security Features
- Nonce verification on all AJAX requests
- Data sanitization and validation
- SQL injection prevention
- XSS protection
- User capability checks
- Secure API communication
📦 What Gets Created in Odoo
Vendors (from Registration Form)
Model: res.partner
- supplier_rank = 1 (marked as vendor/supplier)
- All contact details
- Company information (if provided)
Customers (from WordPress Users)
Model: res.partner
- customer_rank = 1 (marked as customer)
- Synced automatically on registration
- Profile updates reflected in Odoo
Leads (from Interest Form)
Model: crm.lead
- Linked to customer partner_id
- Contains vendor preferences
- Includes detailed requirements
- Set priority and deadline
- Ready for sales team follow-up
🔧 Requirements
- WordPress: 5.0 or higher
- PHP: 7.4 or higher
- MySQL: 5.6 or higher
- Odoo: 13+ (recommended)
- PHP Extensions: cURL, JSON
- WordPress Features: AJAX, User Registration
📥 Installation
Method 1: Manual Upload
- Download the plugin ZIP file
- Navigate to WordPress Admin → Plugins → Add New
- Click "Upload Plugin" button
- Choose the ZIP file and click "Install Now"
- Activate the plugin after installation
- Configure settings at Settings → Odoo Vendor
Method 2: FTP Upload
- Extract the ZIP file
- Upload the
odoo-vendor-registrationfolder to/wp-content/plugins/ - Activate the plugin through WordPress Admin → Plugins
- Configure settings at Settings → Odoo Vendor
Method 3: WordPress CLI
wp plugin install odoo-vendor-registration.zip --activate
⚙️ Configuration
Step 1: Odoo Connection Setup
- Go to Settings → Odoo Vendor
- Enter your Odoo credentials:
- Odoo Base URL:
https://your-odoo-instance.com - Database Name: Your Odoo database name
- Username: Your Odoo admin username
- Password: Your Odoo password
- Model Name:
res.partner(default, recommended)
- Odoo Base URL:
- Click "Test Connection" to verify
- Click "Save Changes"
Step 2: Enable User Auto-Sync (Optional)
- Check ☑ "Auto-Sync WordPress Users"
- Click "Save Changes"
- Click "Sync All Unsynced Users to Odoo" to sync existing users
Step 3: Add Forms to Your Pages
Vendor Registration Form
Create a new page and add:
[odoo_vendor_form]
With custom options:
[odoo_vendor_form
title="Become a Partner"
show_company="true"
button_text="Apply Now"
]
Lead/Interest Form
Create a new page and add:
[odoo_lead_form]
With custom options:
[odoo_lead_form
title="Find Your Vendor"
button_text="Submit Request"
]
🎯 Usage Examples
Basic Vendor Registration Page
<h1>Join Our Vendor Network</h1>
<p>Register to become an approved vendor and reach thousands of customers.</p>
[odoo_vendor_form]
<h2>Benefits of Joining</h2>
<ul>
<li>Access to our customer base</li>
<li>Marketing exposure</li>
<li>Streamlined order management</li>
</ul>
Customer Interest Page
<h1>Tell Us What You Need</h1>
<p>Submit your requirements and we'll match you with the perfect vendor.</p>
[odoo_lead_form]
<p><em>Note: You must be logged in to submit an interest form.</em></p>
Custom Styled Form
<div class="my-vendor-section">
<div class="intro-text">
<h2>Partner With Us</h2>
<p>Complete the form below to start your journey.</p>
</div>
[odoo_vendor_form
title="Vendor Application"
button_text="Submit Application"
]
</div>
🎨 Shortcode Reference
Vendor Form Shortcode
[odoo_vendor_form]
Attributes:
title- Form heading (default: "Vendor Registration")show_company- Show company field: "true" or "false" (default: "true")button_text- Submit button text (default: "Submit Registration")
Examples:
[odoo_vendor_form title="Become a Vendor"]
[odoo_vendor_form show_company="false"]
[odoo_vendor_form button_text="Register Now"]
[odoo_vendor_form title="Apply Today" show_company="true" button_text="Send Application"]
Lead Form Shortcode
[odoo_lead_form]
Attributes:
title- Form heading (default: "Submit Your Interest")button_text- Submit button text (default: "Submit Interest")
Examples:
[odoo_lead_form title="Request a Quote"]
[odoo_lead_form button_text="Send Inquiry"]
[odoo_lead_form title="Find Vendors" button_text="Submit Request"]
📊 Admin Panel Guide
Dashboard Sections
1. Connection Settings
- Configure Odoo credentials
- Test connection status
- Set model preferences
- Enable/disable auto-sync
2. Vendor Submissions
- View all vendor registrations
- Check sync status (Synced/Pending)
- Manually sync failed submissions
- View Odoo partner IDs
3. WordPress Users Sync
- View all registered users
- Check sync status
- Sync individual users
- Bulk sync all unsynced users
- View Odoo partner IDs and sync dates
4. Lead/Interest Submissions
- View all customer interests
- Check lead details
- View selected vendors
- Check priority and deadlines
- Manually sync to Odoo CRM
- Track Odoo lead IDs
🔄 Complete User Journeys
Journey 1: Vendor Registration
1. Vendor visits registration page
2. Fills out form (name, email, phone, company)
3. Submits form (AJAX)
4. Data saved to WordPress
5. Auto-synced to Odoo as supplier (res.partner)
6. Confirmation email sent
7. Admin can approve/view in dashboard
Journey 2: Customer Account
1. Customer registers on WordPress
2. Account created
3. Auto-synced to Odoo as customer (res.partner)
4. Can now submit interest/lead forms
Journey 3: Lead Submission
1. Customer logs in
2. Browses vendor directory
3. Visits lead form page
4. Fills out requirements
5. Selects preferred vendors
6. Submits form
7. Saved to WordPress
8. Auto-synced to Odoo CRM (crm.lead)
9. Sales team receives notification
10. Follow-up begins
🎨 Customization
Custom CSS
Add to your theme's stylesheet or Customizer:
/* Change vendor form background */
.odoo-vendor-form-container .card-header {
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
}
/* Change lead form gradient */
.odoo-lead-form-container .card-header {
background: linear-gradient(135deg, #f46b45 0%, #eea849 100%) !important;
}
/* Customize button colors */
.odoo-vendor-submit-btn {
background-color: #28a745 !important;
}
/* Adjust form width */
.odoo-vendor-form-container,
.odoo-lead-form-container {
max-width: 800px;
margin: 0 auto;
}
Hide Company Field
Use shortcode attribute:
[odoo_vendor_form show_company="false"]
Or via CSS:
#company_name {
display: none;
}
🐛 Troubleshooting
Connection Test Fails
Solution:
- Verify Odoo URL is correct
- Check database name matches exactly
- Ensure username/password are correct
- Confirm Odoo instance is accessible from your server
- Check firewall rules
Form Not Displaying
Solution:
- Ensure plugin is activated
- Verify shortcode syntax:
[odoo_vendor_form]or[odoo_lead_form] - Clear browser and WordPress cache
- Check for JavaScript errors in browser console
- Ensure Bootstrap is loading correctly
Sync Fails
Solution:
- Test connection in Settings → Odoo Vendor
- Check WordPress debug log (
/wp-content/debug.log) - Verify Odoo user has proper permissions
- Confirm model
res.partnerexists in Odoo - Try manual sync from admin dashboard
- Check Odoo logs for API errors
Lead Form Requires Login
This is by design. Lead forms require authentication.
Solution:
- Enable WordPress user registration: Settings → General → Anyone can register
- User must create account first
- Then they can submit lead forms
- Or create custom registration flow
Email Not Sending
Solution:
- Check WordPress email settings
- Test with WP Mail SMTP plugin
- Verify SMTP configuration
- Check spam folder
- Review
wp_mail()logs
📝 Debug Mode
Enable detailed logging:
Edit wp-config.php:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
Check logs at: /wp-content/debug.log
Look for:
Odoo API Error:Odoo API Request:Odoo API Response:Failed to sync:
🔐 Security Best Practices
- SSL/TLS: Use HTTPS for your WordPress site
- Odoo SSL: Enable SSL verification in production (edit
class-odoo-api.phpline 222) - Strong Passwords: Use strong Odoo credentials
- User Roles: Limit admin access
- Regular Updates: Keep WordPress, plugins, and Odoo updated
- Backups: Regular database backups
- API Limits: Monitor API usage
📊 Database Tables
The plugin creates these tables:
wp_odoo_vendor_submissions
Stores vendor registration submissions
wp_odoo_lead_submissions
Stores customer interest/lead submissions
wp_usermeta
Adds fields:
odoo_partner_id- Odoo partner IDodoo_synced- Sync statusodoo_sync_date- Last sync timestampodoo_sync_error- Error message (if any)
🌍 Language Support
Currently available in English. Translation-ready with:
.potfile for translators- Compatible with WPML
- Compatible with Polylang
🤝 Support
For support, please:
- Check Documentation: Review all included
.mdfiles - Enable Debug Mode: Check error logs
- Test Connection: Use admin panel test tool
- Check Odoo: Verify Odoo is accessible
- Contact Developer: LinkedIn
📚 Additional Documentation
QUICK-START.md- 5-minute setup guideINSTALLATION-SUMMARY.md- Detailed installationVISUAL-GUIDE.md- UI reference with examplesTESTING-CHECKLIST.md- QA checklistDEBUG-GUIDE.md- Troubleshooting guideTROUBLESHOOTING.md- Common issuesUSER-SYNC-GUIDE.md- User synchronizationLEAD-FORM-GUIDE.md- Lead form documentationBOOTSTRAP-UI-GUIDE.md- UI customizationCHANGELOG.md- Version history
📋 Changelog
Version 1.0.1 (2025-10-22)
- ✨ Improved error handling with detailed messages
- 🐛 Fixed manual sync error messages
- 📝 Enhanced debug logging
- 🔄 Better API response handling
- 📚 Added comprehensive documentation
Version 1.0.0 (2025-10-22)
- 🎉 Initial release
- ✅ Vendor registration form
- ✅ User auto-sync to Odoo
- ✅ Lead/interest form
- ✅ Bootstrap 5 UI
- ✅ Admin dashboard
- ✅ Email notifications
🎯 Roadmap
Planned Features
- [ ] Bulk vendor sync
- [ ] Custom field mapping
- [ ] Webhook support
- [ ] Import vendors from Odoo
- [ ] Advanced filtering
- [ ] CSV export
- [ ] WooCommerce integration
- [ ] Multi-language support
- [ ] Custom email templates
- [ ] Vendor portal
👏 Credits
Developed by: Mohamad Nagi
Built with:
- WordPress REST API
- Odoo JSON-RPC API
- Bootstrap 5
- Bootstrap Icons
- jQuery
📄 License
This plugin is licensed under GPL v2 or later.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
🌟 Show Your Support
If you find this plugin helpful:
- ⭐ Star this project
- 🐛 Report bugs and suggest features
- 📢 Share with others who might benefit
- ☕ Buy me a coffee (link in profile)
- 📝 Leave a review on WordPress.org
💼 Professional Services
Need custom development or Odoo integration?
- WordPress plugin development
- Odoo customization
- ERP integration solutions
- API development
- Custom workflows
Contact: LinkedIn
Made with ❤️ for the WordPress and Odoo communities
🔗 Links:
© 2025 Mohamad Nagi. All rights reserved.