Replace custom setup wizard with Database Manager (like Python Odoo)

Flow now mirrors Python Odoo exactly:
1. Empty DB → /web redirects to /web/database/manager
2. User fills: master_pwd, email (login), password, phone, lang, country, demo
3. Backend creates admin user, company, seeds chart of accounts
4. Auto-login → redirect to /odoo (webclient)

Removed:
- Custom /web/setup wizard
- Auto-seed on startup

Added:
- /web/database/manager (mirrors odoo/addons/web/controllers/database.py)
- /web/database/create (mirrors exp_create_database)
- Auto-login after DB creation with session cookie

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marc
2026-03-31 23:38:16 +02:00
parent 9c444061fd
commit 822a91f8cf
6 changed files with 237 additions and 204 deletions

View File

@@ -114,9 +114,9 @@ func main() {
log.Printf("odoo: schema migration warning: %v", err)
}
// Check if setup is needed (first boot)
// Check if database needs setup
if service.NeedsSetup(ctx, pool) {
log.Println("odoo: database is empty — setup wizard will be shown at /web/setup")
log.Println("odoo: database is empty — database manager will be shown at /web/database/manager")
} else {
log.Println("odoo: database already initialized")
}