Skip to content

Fill in the Odoo database name the setup check finds - #1607

Merged
helpcodeai merged 1 commit into
mainfrom
fix/odoo-db-autocorrect
Nov 9, 2026
Merged

helpcodeai merged 1 commit into
mainfrom
fix/odoo-db-autocorrect

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

When an Odoo setup check fails because the database name is wrong, the check already asks Odoo which database the address serves (/web/database/list) and names it in the message. Users did not type it in. On 9 Nov 2026, 19 Odoo workspaces were still stuck at the setup check, most of them on exactly this message.

Now, when the address serves a single database, the check runs a second time with that name. When Odoo accepts it, the setup page writes the name into the field, saves it with the connector and says so. When only the API key is refused with the right name, the name is still filled in and the message is about the key.

Changes

  • odoo-database-hint.ts: the advice carries database when the address serves exactly one database other than the one entered (the wording of the messages does not change).
  • AdaptersService.verifyCredentials: one retry with ODOO_DB set to that name; returns corrected: { ODOO_DB } and a note. The internal hint never reaches the response.
  • Setup page: applies corrected to the form, saves it, shows the note on the success screen, and adds corrected to the setup_completed event.
  • Several databases: nothing is guessed; the list is shown as before.

Cloud and self-hosted behave the same: the extra request goes only to the Odoo address the user entered, and only after a failed check.

Type

  • Bug fix

Testing

  • Added/updated unit tests
cd packages/backend
npx jest --maxWorkers=4 src/adapters   # 722 suites passed, 1 skipped; 25721 tests passed
npx tsc --noEmit -p tsconfig.json      # clean
npm run lint                           # clean
cd ../frontend
npx tsc --noEmit -p tsconfig.json      # clean
npm run lint                           # 0 errors (51 existing warnings)

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • All existing tests pass
  • This PR has a descriptive title

@helpcodeai
helpcodeai requested a review from D3nisty as a code owner November 9, 2026 13:36
@helpcodeai
helpcodeai enabled auto-merge (squash) November 9, 2026 13:36
@helpcodeai
helpcodeai merged commit e714d22 into main Nov 9, 2026
17 checks passed
@helpcodeai
helpcodeai deleted the fix/odoo-db-autocorrect branch November 9, 2026 13:50
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant