SmartERP Documentation An Ashewa Technology Solutions Platform

Install into an existing Odoo (Route B)

The scripted route for adding the modules to the Odoo 17 database you already use.

Route B is the "one app, one port" route. The modules go into your existing database, so they appear in the Apps list you already open, at the address you already use. There is no second port and no second database.

Before you start#

Caution

Stop your Odoo service first. Two processes migrating one database at the same time is how databases get corrupted.

You need Odoo 17, and for the AI Workforce the base module described in Choose a module.

Two scripts#

Clone the repository and run the first script. It changes nothing:

git clone https://github.com/danibest212/odoo-social-media-marketing-automation-module.git smarterp-social
cd smarterp-social/deploy
./inspect_target.sh liyu_ai_lab      # use your own database name

It prints where the database lives, which Odoo version wrote it, whether the modules are already there, and what it can find of your Odoo install. Read it before going on. If base is not 17.0.x, stop and use Route A instead.

Then install:

./install_into_existing.sh --db liyu_ai_lab

If the base module is not somewhere the script can find it, point at it:

./install_into_existing.sh --db liyu_ai_lab --base-module /path/to/social_media_integration

What the installer does, in order#

  1. Refuses to continue unless it can see the database and base reports 17.0.x.
  2. Takes a pg_dump -Fc of the whole database to your home directory, and stops if that dump does not write. It prints the exact command to roll back.
  3. Ports social_media_integration's views from Odoo 16 to Odoo 17, keeping the originals as *.odoo16.bak.
  4. Copies both modules into your addons path. Anything it displaces is moved out of the addons path first, so Odoo does not scan it as a module.
  5. Works out per module whether to install or update, and runs Odoo once.
  6. Prints what actually landed, read back from the database.

Flags#

FlagWhat for
--dry-runPrint every step, change nothing. Worth doing first.
--addons-path DIRIf it cannot work out where your addons live.
--odoo-bin PATHIf odoo-bin is not on your PATH.
--odoo-docker NAMEYour Odoo runs in a container.
--db-docker NAMEYour PostgreSQL runs in a container.
--seedAlso load the demo records. Never on production.
--skip-backupSkip the dump. Don't.

If your PostgreSQL is on another host, set PGHOST, PGPORT and PGUSER before running either script.

Undoing it#

The backup is a full database dump:

dropdb liyu_ai_lab && createdb liyu_ai_lab
pg_restore -d liyu_ai_lab ~/liyu_ai_lab_before_ai_workforce_*.dump

What was verified#

Against a database created as a plain Odoo 17 install, standing in for a real one: the port rewrote all 91 attrs= occurrences, both modules installed, the 23-assertion smoke test passed 23 of 23, and the three refusal paths (missing database, not an Odoo database, Odoo 16 database) all stopped without writing anything. The Docker build in Route A was not exercised in that environment, because it had no Docker daemon.

After it is up#

Continue with Users and access, then Scheduled actions.

Last updated: 2026-10-16