New Features
1. **Session ID Based Authentication**
- Added ability to connect to Odoo using only URL and session ID
- Useful for maintaining existing sessions or connecting with pre-authenticated sessions
- Simplified connection process when session ID is already available
Improvements
1. **Connection Flexibility**
- Modified OdooAPI class to handle both credential-based and session-based authentication
- Added validation to ensure either session ID or complete credentials are provided
- Improved error handling for session validation
Technical Changes
1. **API Changes**
- Updated `connect_odoo()` function signature to make credentials optional when session ID is provided
- Modified internal session validation logic to work with both authentication methods
- Added new parameter validations in OdooAPI class initialization
Breaking Changes
- None. All existing functionality remains backward compatible
Migration Guide
No migration needed. Existing code will continue to work as before. To use the new session ID feature, simply provide the session ID instead of credentials.
Bug Fixes
- Improved error handling when invalid session IDs are provided
- Better validation of connection parameters
Security Notes
- Session IDs should be treated as sensitive information
- It's recommended to use HTTPS when connecting with session IDs
- Session expiration policies of your Odoo instance still apply
Usage Recommendations
1. Use credential-based authentication for:
- Initial connections
- Automated scripts
- When session persistence isn't required
2. Use session ID authentication for:
- Maintaining existing sessions
- Integration with other systems that already have valid sessions
- Reducing authentication overhead in trusted environments