fix: make Odoo login configurable via ODOO_USER (default __system__)

Some Odoo instances require the user's actual login/email for API key
auth rather than the __system__ special login. ODOO_USER defaults to
__system__ for standard Odoo 16+ installs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Carlos Garcia
2026-04-24 19:15:06 -04:00
parent 65e471b6ce
commit 590f1b7ee2
3 changed files with 5 additions and 2 deletions

View File

@@ -85,6 +85,7 @@ async def lifespan(app: FastAPI):
url=settings.odoo_url,
db=settings.odoo_db,
api_key=settings.odoo_api_key,
user=settings.odoo_user,
)
logger.info('Odoo client initialised (%s)', settings.odoo_url)
except Exception as exc: