Include an External Repository (Submodules)
You may want to include modules from another repository, such as an OCA community module or a shared library, in your Skysize deployment. Skysize supports public Git submodules and initializes them for you on every deployment.
Submodules must be public and reachable over HTTPS, because Skysize clones them anonymously at build time. Private submodules can't be fetched and their folders will be empty, for those, vendor the code into your repository instead (see below).
Add a public submodule
From a local clone of your repository, add the submodule and push:
# Add a public repository as a submodule
git submodule add https://github.com/OCA/web.git external/oca-web
git commit -m "Add OCA web submodule"
git push
On the next deployment, Skysize initializes the submodule automatically, so the modules inside it are present in the deployed checkout.
Add the submodule from the command line (git submodule add). The GitHub/GitLab web editors can't create a valid submodule, editing .gitmodules by hand in the browser does not register the submodule link.
Make the modules discoverable
Skysize scans your repository one level deep for Odoo modules (each immediate subdirectory that contains a __manifest__.py). If your submodule places modules deeper than that, point Odoo at the submodule's directory using the Custom addons path field, see Organize Modules in Nested Directories.
Alternative: vendor the code (for private code)
If the external code is private, or you simply prefer not to depend on a submodule, copy the modules directly into your own repository so they're part of the normal clone:
git clone --depth=1 https://github.com/OCA/web.git /tmp/oca-web
cp -r /tmp/oca-web/web_responsive ./web_responsive
cp -r /tmp/oca-web/web_no_bin_size ./web_no_bin_size
git add web_responsive web_no_bin_size
git commit -m "Vendor OCA web modules"
git push
Because the modules are now committed in your repository, they're present in every deployment with no extra configuration. To update them, repeat the copy, commit, and push.
Install the module in Odoo
Modules made available by a submodule or vendored code are not installed automatically.
- Open your Odoo instance.
- Enable developer mode: Settings → Activate the developer mode.
- Go to Apps, click Update Apps List, then search for your module and click Install.