Skip to content

Commit ee8557b

Browse files
committed
Release 1.4.0
Added ----- - New option `--enforce-bump` to `odoo-helper ci fix-versions` and `odoo-helper ci check-versions` commands. Changed ------- - Changed default installed version of [wkhtmltopdf](https://wkhtmltopdf.org/) to [0.12.6.1 r3](https://github.com/wkhtmltopdf/packaging/releases/tag/0.12.6.1-3). Thus it have to be working on Ubuntu 22.04+
2 parents f966edf + f6633fd commit ee8557b

10 files changed

+131
-46
lines changed

.gitlab-ci.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ flake8:
6565
# Install deps
6666
- apt-get update -qq && apt-get install -yqq adduser sudo locales ruby git
6767
- update-locale LANG=C.UTF-8 && update-locale LC_ALL=C.UTF-8 && update-locale LANGUAGE=C.UTF-8
68-
- gem install bashcov codecov simplecov-console
68+
- gem install bashcov -v 1.8.2
69+
- gem install codecov simplecov-console
6970

7071
# Configure Odoo user
7172
- adduser -q odoo
@@ -88,12 +89,6 @@ flake8:
8889
- if: $CI_COMMIT_BRANCH
8990

9091

91-
tests:ubuntu:18.04:
92-
image: ubuntu:18.04
93-
variables:
94-
ODOO_INSTALL_NODE_VERSION: "16.15.1"
95-
<<: *tests-definition
96-
9792
tests:ubuntu:20.04:
9893
image: ubuntu:20.04
9994
<<: *tests-definition

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Release Notes
22

3+
## Release 1.4.0 (2023-11-08)
4+
5+
### Added
6+
7+
- New option `--enforce-bump` to `odoo-helper ci fix-versions` and `odoo-helper ci check-versions` commands.
8+
9+
### Changed
10+
11+
- Changed default installed version of [wkhtmltopdf](https://wkhtmltopdf.org/) to [0.12.6.1 r3](https://github.com/wkhtmltopdf/packaging/releases/tag/0.12.6.1-3). Thus it have to be working on Ubuntu 22.04+
12+
13+
---
14+
315
## Release 1.3.0 (2023-03-28)
416

517
### Added

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ The canonical source of odoo-helper-scripts is hosted on [GitLab](https://gitlab
9191
- *13.0*
9292
- *14.0*
9393
- *15.0*
94-
- *16.0* (**experimental**)
94+
- *16.0*
9595
- OS support:
96-
- On *Ubuntu* should work nice (auto tested on *Ubuntu 18.04, 20.04*)
96+
- On *Ubuntu* should work nice (auto tested on *Ubuntu 20.04, 22.04*)
9797
- Also should work on *Debian* based systems, but some troubles may happen with installation of system dependencies.
9898
- Other linux systems - in most cases should work, but system dependecies must be installed manualy.
9999
- Missed feature? [Fill an issue](https://gitlab.com/katyukha/odoo-helper-scripts/issues/new)

bin/odoo-install

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ config_set_defaults; # imported from common module
389389

390390
install_create_project_dir_tree; # imported from 'install' module
391391

392-
if [ "$ODOO_INSTALL_SYS_DEPS_AUTO" -eq 1 ]; then
392+
if [ -n "$ODOO_INSTALL_SYS_DEPS_AUTO" ] && [ "$ODOO_INSTALL_SYS_DEPS_AUTO" -eq 1 ]; then
393393
echo -e "${BLUEC}Installing system dependencies for Odoo ${YELLOWC}${ODOO_VERSION}${BLUEC}...${NC}";
394394
install_sys_deps_for_odoo_version "${ODOO_VERSION}";
395395
fi

docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ please, read carefully [Usage notes](#usage-note) section.
9393
- *13.0*
9494
- *14.0*
9595
- *15.0*
96-
- *16.0* (**experimental**)
96+
- *16.0*
9797
- OS support:
9898
- On *Ubuntu* should work nice
9999
- Also should work on *Debian* based systems, but some troubles may happen with installation of system dependencies.

lib/ci.bash

+16-1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ function ci_check_versions_git {
198198
addons. Increases major part of version number
199199
--fix-version-fp - [experimental] Fix version conflicts during
200200
forwardport
201+
--enforce-bump - [experimental] Enforce version bump for current module.
201202
-h|--help|help - print this help message end exit
202203
203204
Parametrs:
@@ -216,6 +217,7 @@ function ci_check_versions_git {
216217
local opt_fix_version_minor=0;
217218
local opt_fix_version_major=0;
218219
local opt_fix_version_fp=0;
220+
local opt_enforce_version_bump=0
219221
local cdir;
220222
while [[ $# -gt 0 ]]
221223
do
@@ -261,6 +263,10 @@ function ci_check_versions_git {
261263
opt_fix_version_fp=1;
262264
shift;
263265
;;
266+
--enforce-bump)
267+
opt_enforce_version_bump=1;
268+
shift;
269+
;;
264270
*)
265271
break;
266272
;;
@@ -337,7 +343,7 @@ function ci_check_versions_git {
337343
fi
338344

339345
# Compare version
340-
if ci_ensure_versions_ok "$version_before" "$version_after"; then
346+
if [ "$opt_enforce_version_bump" -eq 0 ] && ci_ensure_versions_ok "$version_before" "$version_after"; then
341347
# version before is less that version_after
342348
echoe -e "${GREENC}OK${NC}";
343349
else
@@ -412,6 +418,9 @@ function ci_cmd_git_fix_versions {
412418
addons. Increases minor part of version number
413419
-M|--major - Attempt to fix versions in changed
414420
addons. Increases major part of version number
421+
--ignore-trans - ignore translations
422+
Note: this option may not work on old git versions
423+
--enforce-bump - [experimental] Enforce version bump for current module.
415424
-h|--help|help - print this help message end exit
416425
417426
Parametrs:
@@ -445,6 +454,12 @@ function ci_cmd_git_fix_versions {
445454
git_check_versions_opts+=( --fix-version-major );
446455
shift;
447456
;;
457+
--enforce-bump)
458+
git_check_versions_opts+=( --enforce-bump );
459+
;;
460+
--ignore-trans)
461+
git_check_versions_opts+=( --ingore-trans );
462+
;;
448463
*)
449464
break;
450465
;;

lib/install.bash

+7-6
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ function install_fetch_odoo {
130130
# install_wkhtmltopdf_get_dw_link <os_release_name> [wkhtmltopdf version]
131131
function install_wkhtmltopdf_get_dw_link {
132132
local os_release_name=$1;
133-
local version=${2:-0.12.5};
133+
local version=${2:-0.12.6.1-3};
134134
local system_arch;
135135
system_arch=$(dpkg --print-architecture);
136136

137-
echo "https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/$version/wkhtmltox_${version}-1.${os_release_name}_${system_arch}.deb"
137+
echo "https://github.com/wkhtmltopdf/packaging/releases/download/$version/wkhtmltox_${version}.${os_release_name}_${system_arch}.deb"
138138
}
139139

140140

@@ -153,10 +153,11 @@ function install_wkhtmltopdf_download {
153153
local old_release=$release;
154154

155155
if [ -n "$wkhtmltox_fallback" ] && [ "$(lsb_release -si)" == "Ubuntu" ]; then
156-
# fallback to trusty release for ubuntu systems
157-
release=focal;
156+
# fallback to latest releases for ubuntu systems
157+
release=jammy;
158158
elif [ -n "$wkhtmltox_fallback" ] && [ "$(lsb_release -si)" == "Debian" ]; then
159-
release=stretch;
159+
# fallback to latest releases for debian systems
160+
release=bookworm;
160161
elif [ -z "$wkhtmltox_fallback" ]; then
161162
echoe -e "${REDC}ERROR:${NC} Cannot install ${BLUEC}wkhtmltopdf${NC}! Try to use --fallback option to install wkthmltopdf for other supported release, or install system's wkhtmltopdf.";
162163
if [ -e "$wkhtmltox_path" ]; then rm "$wkhtmltox_path"; fi
@@ -531,7 +532,7 @@ function install_odoo_py_requirements_for_version {
531532
fi
532533
elif [ "$odoo_major_version" -lt 11 ] && [[ "$dependency_stripped" =~ psycopg2* ]]; then
533534
echo "psycopg2==2.8.6";
534-
elif [[ "$dependency_stripped" =~ psycopg2* ]] && exec_py -c "import sys; assert sys.version_info <= (3, 5);" > /dev/null 2>&1; then
535+
elif [[ "$dependency_stripped" =~ psycopg2* ]] && exec_py -c "import sys; assert sys.version_info <= (3, 6);" > /dev/null 2>&1; then
535536
echo "psycopg2-binary==2.8.6";
536537
elif [[ "$dependency_stripped" =~ psycopg2* ]]; then
537538
echo "psycopg2-binary";

lib/odoo.bash

+8-2
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,14 @@ function odoo_clean_compiled_assets {
506506
for dbname in "${dbnames[@]}"; do
507507
# TODO select id,name,store_fname from ir_attachment where name ilike '%/web/content/%-%/%';
508508
PGAPPNAME="odoo-helper" postgres_psql -d "$dbname" << EOF
509-
DELETE FROM ir_attachment WHERE name ILIKE '%/web/content/%/web.assets%';
510-
DELETE FROM ir_attachment WHERE name ~* '/[a-z0-9_]+/static/(lib|src)/.*.(scss|less).css';
509+
DELETE FROM ir_attachment WHERE name ILIKE '%/web/content/%/web.assets%';
510+
DELETE FROM ir_attachment WHERE name ~* '/[a-z0-9_]+/static/(lib|src)/.*.(scss|less).css';
511+
512+
-- Version 15+?
513+
DELETE FROM ir_attachment
514+
WHERE res_model = 'ir.ui.view'
515+
AND type = 'binary'
516+
AND (url ILIKE '/web/content/%' OR url ILIKE '/web/assets/%');
511517
EOF
512518
done
513519
}

lib/version.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
# Odoo Helper Scripts: Version
1010

1111
# Define version number
12-
ODOO_HELPER_VERSION="1.3.0";
12+
ODOO_HELPER_VERSION="1.4.0";
1313
ODOO_HELPER_CONFIG_VERSION="1";

tests/test.bash

+81-25
Original file line numberDiff line numberDiff line change
@@ -683,13 +683,16 @@ odoo-helper addons install --ual --dir ./repositories/crnd-inc/generic-addons;
683683
# List addons in generic_addons
684684
odoo-helper lsa ./repositories/crnd-inc/generic-addons;
685685

686-
# Fetch bureaucrat_helpdesk_lite from Odoo market and try to install it
687-
odoo-helper fetch --odoo-app bureaucrat_helpdesk_lite;
688-
odoo-helper addons install --ual bureaucrat_helpdesk_lite;
686+
# Install poppler utils package, that is required by bureaucrat knowledge base
687+
sudo apt-get install -qqy poppler-utils
689688

690-
# Fetch helpdesk second time testing bechavior
689+
# Fetch bureaucrat_knowledge from Odoo market and try to install it
690+
odoo-helper fetch --odoo-app bureaucrat_knowledge;
691+
odoo-helper addons install --ual --show-log-on-error bureaucrat_knowledge;
692+
693+
# Fetch knowledge base second time testing bechavior
691694
# when same addons already present in system
692-
odoo-helper-fetch --odoo-app bureaucrat_helpdesk_lite;
695+
odoo-helper-fetch --odoo-app bureaucrat_knowledge;
693696

694697
# Prepare to test pull updates with --do-update option
695698
(cd ./repositories/crnd-inc/generic-addons && git reset --hard HEAD^^^1);
@@ -762,9 +765,9 @@ odoo-helper fetch --github crnd-inc/generic-addons
762765
# Install addons from OCA contract
763766
odoo-helper addons install --ual --dir ./repositories/crnd-inc/generic-addons;
764767

765-
# Fetch bureaucrat_helpdesk_lite from Odoo market and try to install it
766-
odoo-helper fetch --odoo-app bureaucrat_helpdesk_lite;
767-
odoo-helper addons install --ual bureaucrat_helpdesk_lite;
768+
# Fetch bureaucrat_knowledge from Odoo market and try to install it
769+
odoo-helper fetch --odoo-app bureaucrat_knowledge;
770+
odoo-helper addons install --ual bureaucrat_knowledge;
768771

769772
# Print list of installed addons
770773
odoo-helper addons find-installed --packager-format;
@@ -819,9 +822,9 @@ odoo-helper fetch --github crnd-inc/generic-addons
819822
# Install addons from OCA contract
820823
odoo-helper addons install --ual --dir ./repositories/crnd-inc/generic-addons;
821824

822-
# Fetch bureaucrat_helpdesk_lite from Odoo market and try to install it
823-
odoo-helper fetch --odoo-app bureaucrat_helpdesk_lite;
824-
odoo-helper addons install --ual bureaucrat_helpdesk_lite;
825+
# Fetch bureaucrat_knowledge from Odoo market and try to install it
826+
odoo-helper fetch --odoo-app bureaucrat_knowledge;
827+
odoo-helper addons install --ual bureaucrat_knowledge;
825828

826829
# Print list of installed addons
827830
odoo-helper addons find-installed;
@@ -892,15 +895,15 @@ odoo-helper fetch --github crnd-inc/generic-addons
892895
## Install addons from OCA contract
893896
odoo-helper addons install --ual --dir ./repositories/crnd-inc/generic-addons;
894897

895-
## Fetch bureaucrat_helpdesk_lite from Odoo market and try to install it
896-
odoo-helper fetch --odoo-app bureaucrat_helpdesk_lite;
897-
odoo-helper addons install --ual bureaucrat_helpdesk_lite;
898+
## Fetch bureaucrat_knowledge from Odoo market and try to install it
899+
odoo-helper fetch --odoo-app bureaucrat_knowledge;
900+
odoo-helper addons install --ual bureaucrat_knowledge;
898901

899902
## Print list of installed addons
900903
odoo-helper addons find-installed;
901904

902-
## Run tests for helpdesk lite
903-
odoo-helper test generic_request crnd_wsd
905+
## Run tests for knowledge
906+
odoo-helper test bureaucrat_knowledge
904907

905908
# Drop created databases
906909
odoo-helper db drop odoo15-odoo-test;
@@ -958,25 +961,78 @@ odoo-helper lsd; # List databases
958961
odoo-helper install website;
959962

960963
## Fetch oca/contract
961-
#odoo-helper fetch --github crnd-inc/generic-addons
962-
963-
## Install addons from OCA contract
964-
#odoo-helper addons install --ual --dir ./repositories/crnd-inc/generic-addons;
964+
odoo-helper fetch --github crnd-inc/generic-addons
965965

966-
## Fetch bureaucrat_helpdesk_lite from Odoo market and try to install it
967-
#odoo-helper fetch --odoo-app bureaucrat_helpdesk_lite;
968-
#odoo-helper addons install --ual bureaucrat_helpdesk_lite;
966+
## Fetch bureaucrat_knowledge from Odoo market and try to install it
967+
odoo-helper fetch --odoo-app bureaucrat_knowledge;
968+
odoo-helper addons install --ual bureaucrat_knowledge;
969969

970970
## Print list of installed addons
971-
#odoo-helper addons find-installed;
971+
odoo-helper addons find-installed;
972972

973973
## Run tests for helpdesk lite
974-
#odoo-helper test generic_request crnd_wsd
974+
odoo-helper test bureaucrat_knowledge
975975

976976
# Drop created databases
977977
odoo-helper db drop odoo16-odoo-test;
978978

979979

980+
#echo -e "${YELLOWC}
981+
#=================================
982+
#Install and check Odoo 17.0 (Py3)
983+
#=================================
984+
#${NC}"
985+
986+
#cd ../;
987+
988+
## Remove odoo 17
989+
## this is needed to bypass gitlab.com limitation of disk space for CI jobs
990+
#rm -rf ./odoo-16.0
991+
992+
## Install odoo 17
993+
#odoo-helper install sys-deps -y 17.0;
994+
995+
#odoo-install --install-dir odoo-17.0 --odoo-version 17.0 \
996+
#--http-port 8569 --http-host local-odoo-16 \
997+
#--db-user odoo16 --db-pass odoo --create-db-user \
998+
#--build-python-if-needed
999+
1000+
#cd odoo-17.0;
1001+
1002+
## Install py-tools and js-tools
1003+
#odoo-helper install py-tools;
1004+
#odoo-helper install js-tools;
1005+
1006+
#odoo-helper server run --stop-after-init; # test that it runs
1007+
1008+
## Show project status
1009+
#odoo-helper status;
1010+
#odoo-helper server status;
1011+
#odoo-helper start;
1012+
#odoo-helper ps;
1013+
#odoo-helper status;
1014+
#odoo-helper server status;
1015+
#odoo-helper stop;
1016+
1017+
## Show complete odoo-helper status
1018+
#odoo-helper status --tools-versions --ci-tools-versions;
1019+
1020+
## Database management
1021+
#odoo-helper db create --tdb --lang en_US;
1022+
1023+
#odoo-helper addons update-list --tdb;
1024+
#odoo-helper addons install --tdb --module crm;
1025+
#odoo-helper addons test-installed crm;
1026+
1027+
#odoo-helper lsd; # List databases
1028+
1029+
### Install addon website via 'odoo-helper install'
1030+
#odoo-helper install website;
1031+
1032+
## Drop created databases
1033+
#odoo-helper db drop odoo17-odoo-test;
1034+
1035+
9801036
echo -e "${YELLOWC}
9811037
=============================================================
9821038
Run 'prepare-docs' script to test generation of help messages

0 commit comments

Comments
 (0)