Automated supplier pricelist synchronization for Odoo 19 Community Edition
Import supplier pricelists directly into Odoo via multiple connection methods:
- HTTP/HTTPS - Download CSV/JSON/XML files from web servers
- REST API - Connect to supplier APIs with automatic JSON→CSV conversion
- FTP/SFTP - Retrieve files from FTP servers
- Database - Direct PostgreSQL/MySQL/MSSQL queries
Features intelligent column mapping, automatic template creation, and scheduled imports with full history tracking.
- HTTP/HTTPS Downloads - Direct file downloads from URLs
- REST API Integration - JSON APIs with automatic CSV conversion
- SFTP/FTP Servers - Automated file retrieval with pattern matching
- Database Connections - Direct SQL queries to supplier databases
- Auto-detection - Automatically detects CSV columns on first import
- Template System - Save and reuse column mappings per supplier
- Dynamic Updates - Auto-adds new columns when supplier adds fields
- Flexible Mapping - Map to product fields, supplier info, or leave unmapped
- Scheduled Imports - Configure automatic imports (hourly/daily/weekly)
- Manual Triggers - Run imports on-demand with "Run Import Now" button
- Import History - Complete audit trail with success/warning/error tracking
- Statistics Dashboard - Overview of all imports per supplier
- API Authentication - Support for Basic Auth, Bearer tokens, and API keys
- SFTP Keys - Secure file transfers with username/password
- Database Credentials - Encrypted connection strings
- Odoo 19.0 Community or Enterprise
- Python 3.10+
- PostgreSQL 12+
The following Python packages are automatically installed:
paramiko- For SFTP connectionspsycopg2- For PostgreSQL database imports (usually pre-installed)requests- For HTTP/API imports (pre-installed with Odoo)
- Clone or download this module to your Odoo addons directory:
cd /path/to/odoo/addons
git clone https://github.com/yourusername/supplier_pricelist_sync.git-
Restart Odoo to load the new module
-
Update Apps List in Odoo (Settings → Apps → Update Apps List)
-
Install Module:
- Go to Apps
- Search for "Supplier Pricelist Sync"
- Click Install
- Navigate to Supplier Import → Direct Import
- Select Supplier from dropdown
- Upload CSV file
- Review Mappings - System auto-detects columns
- Click Import - Products are matched and updated
- Navigate to Supplier Import → Scheduled Imports
- Create new scheduled import
- Configure connection:
- Select import method (HTTP/API/SFTP/Database)
- Enter connection details (URL, credentials, etc.)
- Set schedule type (Manual/Hourly/Daily/Weekly)
- Test with "Run Import Now" button
- Save - On first run, template is auto-created
- Map Columns - Open template and assign Odoo fields
- Activate - Toggle active switch to enable automation
- System downloads data and detects columns
- Template created with all detected columns (unmapped)
- User opens template to assign mappings
- Future imports use saved mappings automatically
For successful import, map at minimum:
- Product Identifier: Either
Barcode(EAN) orInternal Reference(SKU) - Price:
[Leverancier] Prijsfield
- Stock: Supplier stock quantity
- Delivery Time: Lead time in days
- Product Name: For creating new products
- Brand: Product brand
- Use for: Direct file downloads (CSV, JSON, XML)
- Config: Download URL
- Example:
http://supplier.com/exports/pricelist.csv
- Use for: JSON APIs
- Config: API Endpoint + Authentication
- Features: Automatic JSON to CSV conversion
- Auth Types: None, Basic, Bearer Token, API Key
- Use for: Files on FTP servers
- Config: Host, Port, Username, Password, Path, Filename Pattern
- Features: Automatically selects newest matching file
- Example Pattern:
pricelist_*.csv
- Use for: Direct database queries
- Config: DB Type, Host, Port, Database Name, Username, Password, SQL Query
- Supported: PostgreSQL, MySQL, MS SQL Server
- Example Query:
SELECT ean, sku, price, stock FROM products WHERE active = true
supplier_pricelist_sync/
├── models/
│ ├── dashboard.py # Statistics dashboard
│ ├── direct_import.py # Manual CSV import wizard
│ ├── import_history.py # Import audit trail
│ ├── import_schedule.py # Scheduled imports (main logic)
│ ├── supplier_mapping_template.py # Column mapping templates
│ ├── product_supplierinfo.py # Supplierinfo extensions
│ ├── product_template.py # Product template extensions
│ └── base_import_extend.py # Prevent duplicate supplierinfo
├── wizard/
│ └── mapping_save_wizard.py # Save mapping as template
├── views/
│ ├── dashboard_views.xml
│ ├── direct_import_views.xml
│ ├── import_history_views.xml
│ ├── import_schedule_views.xml
│ ├── supplier_mapping_template_views.xml
│ ├── product_supplierinfo_views.xml
│ ├── product_template_views.xml
│ └── menus.xml
├── security/
│ └── ir.model.access.csv
├── data/ # Sample CSV files
│ ├── copaco_sample.csv
│ ├── generic_sample.csv
│ └── edge_case_sample.csv
└── __manifest__.py
Scheduled imports automatically create cron jobs when activated. These can be managed via:
- Settings → Technical → Automation → Scheduled Actions
Default access rights:
- Import Users: Can view and run imports
- Import Managers: Can create and configure schedules
- Configure via Settings → Users & Companies → Groups
- Email attachment import not yet implemented (planned for v2.2)
- XML parsing for API responses not implemented
- Product auto-creation from failed imports planned for v2.2
- ✅ Multiple import methods (HTTP, API, SFTP, Database)
- ✅ Automatic JSON to CSV conversion
- ✅ Scheduled imports with cron integration
- ✅ Template system with auto-column detection
- ✅ Import history and statistics
- ✅ Smart product matching (EAN/SKU)
- ✅ Duplicate prevention for supplierinfo
- Direct Python import (bypassing Odoo's native import)
- Template-based column mapping
- Import history tracking
- Dashboard with statistics
- Initial release with manual CSV import
Author: Nerbys
Website: https://nerbys.nl
Maintainer: Sybren de Bruijn
This module is licensed under LGPL-3.
See LICENSE file for full details.
Contributions welcome! See CONTRIBUTING.md for guidelines.
For issues or questions:
- GitHub Issues: https://github.com/yourusername/supplier_pricelist_sync/issues
- Email: support@nerbys.nl