fix: update Odoo client for v19 compatibility

- Use persistent httpx client to maintain session cookies
- Update endpoint path to /web/dataset/call_kw/{model}/{method}
- Handle auth response as dict (uid extraction)
- Remove kanban_state field (doesn't exist in Odoo 19)
- Add close() method for graceful shutdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-15 10:10:36 +00:00
parent 9b5d9a7b3c
commit 5e3d8d45de
2 changed files with 28 additions and 14 deletions

View File

@@ -73,6 +73,7 @@ async def lifespan(app: FastAPI):
task = asyncio.create_task(refresh_loop())
yield
task.cancel()
await odoo_client.close()
app = FastAPI(title="TV Dashboard API", lifespan=lifespan)