odoo remove module task

This commit is contained in:
Janik von Rotz committed 2021-03-16 19:22:22 +01:00
1 parent fde447ba50
commit db1cfc9cff
2 files changed
+19

No files matched your search

+18
View File
@@ -64,12 +64,27 @@ function update-module() {
}
function install-module() {
if test -z "$1"; then echo "\$1 is empty"; exit; fi
if test -z "$2"; then echo "\$2 is empty"; exit; fi
cd odoo
locale
activate-venv
./odoo-bin -d $1 -i $2 --config '../config/odoo-src.conf' --stop-after-init --no-http
}
function remove-module() {
if test -z "$1"; then echo "\$1 is empty"; exit; fi
if test -z "$2"; then echo "\$2 is empty"; exit; fi
cd odoo
locale
activate-venv
echo "self.env['ir.module.module'].search([('name', '=', '$2')]).button_immediate_uninstall()" |
python3 odoo-bin shell -d $1 --config '../config/odoo-src.conf' --no-http
}
function create-module() {
if test -z "$1"; then echo "\$1 is empty"; exit; fi
@@ -225,6 +240,9 @@ case "$1" in
install-module)
install-module $2 $3
;;
remove-module)
remove-module $2 $3
;;
release-module)
release-module $2
;;
+1
View File
@@ -14,6 +14,7 @@ start-shell|[db]|Start Odoo shell from source folder.
create-module|[name]|Create new Odoo module from template.
install-module|[db] [name]|Install target Odoo module.
update-module|[db] [name]|Update target Odoo module.
remove-module|[db] [name]|Remove target Odoo module.
zip-module|[path]|Create zip file for module.
release-module|[path]|Create GitHub release for module.
drop-db|[db]|Drop target Odoo database.