- Added comprehensive dependency management with proper OdooRPC library integration - Fixed XML-RPC, JSON-RPC, and OdooRPC connection authentication issues - Implemented proper Odoo 18 API key format support with scope parameter - Added intelligent field mapping wizard with Full/Required/Balanced modes - Enhanced error handling and connection state management - Removed legacy API key system for clean reinstall capability - Added detailed debug logging for connection troubleshooting
24 lines
843 B
Python
24 lines
843 B
Python
from . import models
|
|
from . import controllers
|
|
|
|
from odoo import api, SUPERUSER_ID
|
|
|
|
def post_init_hook(env):
|
|
"""Post-install hook to set up Bemade-specific configuration."""
|
|
# Set default configuration parameters for Bemade instances
|
|
ICP = env['ir.config_parameter']
|
|
|
|
# Ensure the parameters exist with default values
|
|
defaults = {
|
|
'bemade.sync.default_url': 'https://odoo.bemade.org',
|
|
'bemade.sync.default_database': 'bemade',
|
|
'bemade.sync.default_username': 'sync_user',
|
|
'bemade.sync.default_connection_type': 'odoorpc',
|
|
'bemade.sync.default_timeout': '30',
|
|
'bemade.sync.default_retry_count': '3',
|
|
'bemade.sync.default_retry_delay': '5',
|
|
}
|
|
|
|
for key, value in defaults.items():
|
|
if not ICP.get_param(key):
|
|
ICP.set_param(key, value)
|