Merge branch 'develop'

- Update odoo 12.0
- support ubuntu 22.04
- update support ubuntu/debian
- security pip update with poetry
- fix poetry update python2 and desuet library
- update source_repo_addons.csv
This commit is contained in:
Mathieu Benoit 2022-12-21 22:59:21 -05:00
commit d8c96eddc4
20 changed files with 4422 additions and 4297 deletions

1
.gitignore vendored
View file

@ -22,3 +22,4 @@ image_db
get-poetry.py get-poetry.py
artifacts artifacts
wkhtmltox* wkhtmltox*
cache

View file

@ -1 +1 @@
3.7.12 3.7.16

View file

@ -7,6 +7,35 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
**Migration note**
- Delete poetry at path `~/.poetry` and `./get-poetry.py`, and rerun installation dev with `make install_dev`
## Added
- Support Ubuntu 22.04 with installation script
## Changed
- Odoo 12.0 update from 22-07-2020 to 10-10-2022
- Update pip dependency with security update
- Pillow==9.3.0
- gitpython==3.1.29
- psycopg2==2.9.5
- Update to Python==3.7.16
- Update poetry==1.3.1
- Update imagedb with all Odoo update
- Repo documentation-user from Odoo change to documentation
- Repo odooaktiv/QuotationRevision is deleted
### Fixed
- Debian 11 installation script
### Removed
- Ubuntu 18.04 is broken, need to install manually nodejs and npm
## [1.4.0] - 2022-10-05 ## [1.4.0] - 2022-10-05
**Migration note** **Migration note**
@ -68,7 +97,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- website_form_builder HTML support and allow option to align send button - website_form_builder HTML support and allow option to align send button
- Odoo cherry-pick 2 commits bus fix - Odoo cherry-pick 2 commits bus fix
- Minor fix css color into module hr_theme from repo CybroOdoo_OpenHRMS - Minor fix css color into module hr_theme from repo CybroOdoo_OpenHRMS
- Typo in project task when logs time - Typo in project task when logging time
### Removed ### Removed

View file

@ -402,6 +402,7 @@ image_db_create_test_website_attachments:
./script/db_restore.py --clean_cache ./script/db_restore.py --clean_cache
./script/db_restore.py --database code_generator_test_website_attachements --image test_website_attachments ./script/db_restore.py --database code_generator_test_website_attachements --image test_website_attachments
# Do your stuff # Do your stuff
./.venv/bin/python3 ./odoo/odoo-bin --limit-time-real 999999 --no-http -c config.conf --stop-after-init -d code_generator_test_website_attachements -u all
./.venv/bin/python3 ./odoo/odoo-bin db --backup --database code_generator_test_website_attachements --restore_image test_website_attachments ./.venv/bin/python3 ./odoo/odoo-bin db --backup --database code_generator_test_website_attachements --restore_image test_website_attachments
.PHONY: image_diff_base_website .PHONY: image_diff_base_website

View file

@ -211,8 +211,8 @@ Read GIT_REPO.md to understand how changer version.
## Python version ## Python version
Your actual version is in file .python-version. Use script `./script/version/change_python_version.sh 3.7.12` to change Your actual version is in file .python-version. Use script `./script/version/change_python_version.sh 3.7.16` to change
to version 3.7.12 . to version 3.7.16 .
Run the installation, `make install_dev`. Run the installation, `make install_dev`.

View file

@ -26,3 +26,11 @@ poetry add PYTHON_MODULE
If you got this error `relative path can't be expressed as a file URI` when executing poetry, delete directory If you got this error `relative path can't be expressed as a file URI` when executing poetry, delete directory
artifacts: `rm -rf artifacts/` and rerun the update. artifacts: `rm -rf artifacts/` and rerun the update.
## Upgrade Poetry
Change version in file `./script/install_locally.sh` into constant `POETRY_VERSION`.
Erase directory `~/.poetry` and `./get-poetry.py`.
Run installation script for OS, check `./script/install_locally.sh`.

View file

@ -1,4 +1,4 @@
FROM python:3.7.12-slim-buster FROM python:3.7.16-slim-buster
MAINTAINER TechnoLibre <docker@technolibre.ca> MAINTAINER TechnoLibre <docker@technolibre.ca>
SHELL ["/bin/bash", "-xo", "pipefail", "-c"] SHELL ["/bin/bash", "-xo", "pipefail", "-c"]

View file

@ -1 +1 @@
3.7.12 3.7.16

View file

@ -17,3 +17,5 @@ swiftclient
u2flib_server u2flib_server
voicent voicent
xlsxwriter xlsxwriter
suds-jurko
vatnumber

8282
poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -18,74 +18,60 @@ license = "AGPL-3.0-or-later"
authors = [ "Mathieu Benoit <mathben@technolibre.ca>",] authors = [ "Mathieu Benoit <mathben@technolibre.ca>",]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.7.12" python = "^3.7.16"
Babel = "2.9.1"
Cerberus = "^1.3.4"
Cython = "^0.29.32"
GitPython = "3.1.12"
Jinja2 = "2.11.3"
Js2Py = "^0.71"
Mako = "1.2.2"
MarkupSafe = "0.23"
Pillow = "9.0.1"
PyJWT = "2.5.0"
PyMySQL = "^1.0.2"
PyPDF2 = "1.27.8"
PyYAML = "6.0"
SOAPpy = "^0.12.22"
SQLAlchemy = "^1.4.41"
Shapely = "1.6.4.post2"
Sphinx = "1.6.7"
Unidecode = "1.0.22"
Voicent-Python = "^1.0"
Werkzeug = "0.11.15"
XlsxWriter = "0.9.3"
agithub = "^2.2.2" agithub = "^2.2.2"
aioshutil = "^1.1" aioshutil = "<1.2"
altair = "^4.2.0" altair = "^4.2.0"
argcomplete = "^2.0.0" argcomplete = "^2.0.0"
asterisk = "^0.0.8" asterisk = "^0.0.8"
astor = "^0.8.1" astor = "^0.8.1"
babel = "2.9.1"
beautifulsoup4 = "^4.11.1" beautifulsoup4 = "^4.11.1"
bokeh = "1.1.0" bokeh = "1.1.0"
boto3 = ">=1.20.41" boto3 = ">=1.20.41"
cachetools = ">=2.0.1" cachetools = ">=2.0.1"
cerberus = "^1.3.4"
chardet = "5.0.0" chardet = "5.0.0"
click = "^8.1.3" click = "^8.1.3"
cloudflare = "^2.10.2" cloudflare = "^2.11.1"
code-writer = "^1.1.1" code-writer = "^1.1.1"
colorama = "^0.4.5" colorama = "^0.4.6"
configparser = "5.0.2" configparser = "5.0.2"
coverage = "^6.5.0" coverage = "^7.0.0"
cryptography = "36.0.1" cryptography = "36.0.1"
css-html-prettify = "^2.5.5" css-html-prettify = "^2.5.5"
cython = "^0.29.32"
ddt = "1.2.0" ddt = "1.2.0"
decorator = "4.0.10" decorator = "4.0.10"
docutils = "0.17.1" docutils = "0.17.1"
ebaysdk = "2.1.5" ebaysdk = "2.1.5"
email-validator = "^1.3.0" email-validator = "^1.3.0"
emoji = "^2.1.0" emoji = "^2.2.0"
escpos = "^1.9" escpos = "^1.9"
extract-msg = "^0.36.4" extract-msg = "^0.38.4"
factur-x = "^2.3" factur-x = "^2.3"
feedparser = "5.2.1" feedparser = "6.0.10"
flake8 = "^5.0.4" flake8 = "<6.0.0"
formio-data = "^0.4.6" formio-data = "^0.4.7"
freezegun = "0.3.11" freezegun = "0.3.11"
geojson = "2.4.1" geojson = "2.4.1"
gevent = "1.3.4" gevent = "1.5.0"
gitpython = "3.1.29"
giturlparse = "^0.10.0" giturlparse = "^0.10.0"
greenlet = "0.4.13" greenlet = "0.4.14"
html2text = "2016.9.19" html2text = "2016.9.19"
html5print = "^0.1.2" invoice2data = "^0.4.0"
invoice2data = "^0.3.6"
iscompatible = "^0.1.1" iscompatible = "^0.1.1"
isort = "^5.10.1" isort = "^5.11.4"
jinja2 = "2.11.3"
jira = "2.0.0" jira = "2.0.0"
js2py = "^0.74"
keystoneauth1 = "3.14.0" keystoneauth1 = "3.14.0"
lasso = "^0.0.5" lasso = "^0.0.5"
libsass = "0.12.3" libsass = "0.12.3"
lxml = "4.9.1" lxml = "4.9.1"
mako = "1.2.2"
markupsafe = "0.23"
matplotlib = ">=2.0.0" matplotlib = ">=2.0.0"
mock = "2.0.0" mock = "2.0.0"
mpld3 = "0.3" mpld3 = "0.3"
@ -96,47 +82,51 @@ oauthlib = "2.1.0"
oca-decorators = "^0.0.1" oca-decorators = "^0.0.1"
ofxparse = "0.16" ofxparse = "0.16"
openpyxl = "^3.0.10" openpyxl = "^3.0.10"
openupgradelib = "^3.3.4" openupgradelib = "^3.4.0"
orjson = "3.6.0" orjson = "3.6.0"
paho-mqtt = "^1.6.1" paho-mqtt = "^1.6.1"
pandas = "1.3.5" pandas = "1.3.5"
paramiko = "^2.11.0" paramiko = "^2.12.0"
passlib = "1.6.5" passlib = "1.6.5"
pdf2image = "^1.16.0" pdf2image = "^1.16.0"
pdfminer = "^20191125" pdfminer = "^20191125"
pexpect = "^4.8.0" pexpect = "^4.8.0"
phonenumbers = "^8.12.56" phonenumbers = "^8.13.2"
pillow = "9.3.0"
plotly = "4.1.0" plotly = "4.1.0"
premailer = "^3.10.0" premailer = "^3.10.0"
psutil = "5.9.0" psutil = "5.9.0"
psycopg2 = "2.7.3.1" psycopg2 = "2.9.5"
py-Asterisk = "^0.5.18" py-asterisk = "^0.5.18"
"py3o.formats" = "^0.3" py3o-formats = "^0.3"
"py3o.template" = "^0.10.0" py3o-template = "^0.10.0"
pycountry = "^22.3.5" pycountry = "^22.3.5"
pycrypto = "2.6.1" pycrypto = "2.6.1"
pydot = "1.2.3" pydot = "1.2.3"
pygount = "<1.2.0" pygount = "<1.2.0"
pyjsparser = "^2.7.1" pyjsparser = "^2.7.1"
pyjwt = "2.5.0"
pyldap = "2.4.28" pyldap = "2.4.28"
pymssql = "^2.2.5" pymssql = "^2.2.7"
pyotp = "^2.7.0" pymysql = "^1.0.2"
pyotp = "^2.8.0"
pyparsing = "2.1.10" pyparsing = "2.1.10"
pypdf2 = "1.27.8"
pyproj = "3.2.1" pyproj = "3.2.1"
pyserial = "3.1.1" pyserial = "3.1.1"
pysftp = "^0.2.9" pysftp = "^0.2.9"
python-chess = "<0.24" python-chess = "<0.24"
python-csv = "^0.0.13"
python-dateutil = "2.7.3" python-dateutil = "2.7.3"
python-git = "^2018.2.1" python-git = "^2018.2.1"
python-json-logger = "0.1.5" python-json-logger = "0.1.5"
python-keystoneclient = "3.22.0" python-keystoneclient = "3.22.0"
python-slugify = ">=3.0.2" python-slugify = ">=3.0.2"
python-stdnum = "^1.17" python-stdnum = "^1.18"
python-swiftclient = "3.9.0" python-swiftclient = "3.9.0"
python-u2flib-server = "^5.0.1" python-u2flib-server = "^5.0.1"
pytz = "2017.3" pytz = "2017.3"
pyusb = "1.0.0" pyusb = "1.0.0"
pyyaml = "6.0"
pyzbar = "^0.1.9" pyzbar = "^0.1.9"
qrcode = "5.3" qrcode = "5.3"
raven = "^6.10.0" raven = "^6.10.0"
@ -146,35 +136,40 @@ requests = "2.28.1"
requests-mock = "^1.10.0" requests-mock = "^1.10.0"
requests-oauthlib = "1.1.0" requests-oauthlib = "1.1.0"
requests-toolbelt = "0.9.1" requests-toolbelt = "0.9.1"
retrying = "^1.3.3" retrying = "^1.3.4"
serial = "^0.0.97" serial = "^0.0.97"
shapely = "1.6.4.post2"
simplejson = "3.16.0" simplejson = "3.16.0"
slugify = "^0.0.1" slugify = "^0.0.1"
soappy = "^0.12.22"
sphinx = "1.6.7"
sphinx-intl = "^2.0.1" sphinx-intl = "^2.0.1"
sphinx-patchqueue = ">=1.0" sphinx-rtd-theme = "^1.1.1"
sphinx-rtd-theme = "^1.0.0" sqlalchemy = "^1.4.45"
statsd = "3.2.1" statsd = "3.2.1"
suds-jurko = "0.6"
toml = "^0.10.2" toml = "^0.10.2"
tornado = "6.1" tornado = "6.1"
twython = "^3.9.1" twython = "^3.9.1"
unidecode = "1.0.22"
unidiff = "^0.7.4" unidiff = "^0.7.4"
urllib3 = "1.26.8" urllib3 = "1.26.8"
vatnumber = "1.2"
vcrpy = ">=2.1.1" vcrpy = ">=2.1.1"
vcrpy-unittest = "^0.1.7" vcrpy-unittest = "^0.1.7"
vobject = "0.9.3" vobject = "0.9.3"
voicent-python = "^1.0"
webcolors = "1.10" webcolors = "1.10"
websocket-client = "^1.4.1" websocket-client = "^1.4.2"
wechatpy = "^1.8.18" wechatpy = "^1.8.18"
werkzeug = "0.11.15"
wget = "^3.2" wget = "^3.2"
wheel = "^0.37.1" wheel = "^0.38.4"
win_unicode_console = "^0.5" win-unicode-console = "^0.5"
xlrd = "1.0.0" xlrd = "1.0.0"
xlsxwriter = "0.9.3"
xlwt = "1.3" xlwt = "1.3"
xmlformatter = "^0.2.4" xmlformatter = "^0.2.4"
xmltodict = "^0.13.0" xmltodict = "^0.13.0"
zeep = "^4.1.0" zeep = "^4.2.1"
zipp = ">=3.6.0" zipp = ">=3.6.0"
zxcvbn = "^4.4.28" zxcvbn = "^4.4.28"

View file

@ -1,14 +1,14 @@
# For script # For script
giturlparse giturlparse
agithub agithub
GitPython==3.1.12 GitPython==3.1.29
retrying retrying
xmltodict xmltodict
openupgradelib openupgradelib
unidiff unidiff
colorama colorama
wheel wheel
aioshutil aioshutil<1.2
# For OSX # For OSX
cython cython
@ -27,8 +27,6 @@ factur-x
websocket-client websocket-client
python-stdnum python-stdnum
python-u2flib_server python-u2flib_server
python-dateutil
python-csv
python-chess python-chess
python-git python-git
voicent-python voicent-python
@ -38,12 +36,11 @@ coverage
# For logical test # For logical test
docutils==0.17.1 docutils==0.17.1
flake8 flake8<6.0.0
git+https://github.com/oca/pylint-odoo.git git+https://github.com/oca/pylint-odoo.git
# oca-maintainers-tools # oca-maintainers-tools
# git+https://github.com/OCA/maintainer-tools.git#egg=oca-maintainers-tools # git+https://github.com/OCA/maintainer-tools.git#egg=oca-maintainers-tools
xmlformatter xmlformatter
html5print
css-html-prettify css-html-prettify
BeautifulSoup4 BeautifulSoup4
git+https://github.com/psf/black.git@22.3.0 git+https://github.com/psf/black.git@22.3.0
@ -71,10 +68,13 @@ pyproj==3.2.1
# fix zipp depend on importlib-metadata # fix zipp depend on importlib-metadata
zipp>=3.6.0 zipp>=3.6.0
# Upgrade psycopg for better support python3
psycopg2==2.9.5
# Force update dependency to fix poetry # Force update dependency to fix poetry
# numpy >=1.22 is not compatible with python 3.7 # numpy >=1.22 is not compatible with python 3.7
numpy==1.21.1 numpy==1.21.1
feedparser==6.0.10
# Solve pcodedmp, oletools, rtfde and extract-msg # Solve pcodedmp, oletools, rtfde and extract-msg
win_unicode_console win_unicode_console
@ -91,7 +91,7 @@ pyyaml==6.0
lxml==4.9.1 lxml==4.9.1
cryptography==36.0.1 cryptography==36.0.1
psutil==5.9.0 psutil==5.9.0
Pillow==9.0.1 Pillow==9.3.0
Babel==2.9.1 Babel==2.9.1
reportlab==3.6.5 reportlab==3.6.5
pycrypto==2.6.1 pycrypto==2.6.1

View file

@ -965,9 +965,15 @@ class GitTool:
print("Error when forking repo %s" % forked_repo) print("Error when forking repo %s" % forked_repo)
exit(1) exit(1)
else: else:
print( try:
"Forked %s to %s" % (upstream_url, forked_repo["html_url"]) print(
) "Forked %s to %s"
% (upstream_url, forked_repo["html_url"])
)
except Exception as e:
print(e)
print(forked_repo)
print(upstream_url)
elif status == 202: elif status == 202:
print("Forked repo %s already exists" % forked_repo["full_name"]) print("Forked repo %s already exists" % forked_repo["full_name"])
elif status != 200: elif status != 200:

View file

@ -37,8 +37,8 @@ sudo npm install -g rtlcss
sudo npm install -g less sudo npm install -g less
sudo npm install -g prettier sudo npm install -g prettier
sudo npm install -g prettier @prettier/plugin-xml sudo npm install -g prettier @prettier/plugin-xml
yes n|pyenv install 3.7.12 yes n|pyenv install 3.7.16
pyenv local 3.7.12 pyenv local 3.7.16
echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

View file

@ -12,12 +12,18 @@ EL_USER=${USER}
## https://github.com/odoo/odoo/wiki/Wkhtmltopdf ): ## https://github.com/odoo/odoo/wiki/Wkhtmltopdf ):
# Ubuntu 20.04 # Ubuntu 20.04
UBUNTU_VERSION=$(lsb_release -rs) UBUNTU_VERSION=$(lsb_release -rs)
OS=$(lsb_release -si)
if [ "20.04" == "${UBUNTU_VERSION}" ]; then if [ "20.04" == "${UBUNTU_VERSION}" ]; then
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
elif [ "22.04" == "${UBUNTU_VERSION}" ]; then
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
elif [ "18.04" == "${UBUNTU_VERSION}" ]; then elif [ "18.04" == "${UBUNTU_VERSION}" ]; then
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
elif [[ "${OS}" == "Debian" ]]; then
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.bullseye_amd64.deb
else else
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb echo "Your version of Ubuntu is not supported, only support 18.04, 20.04 and 22.04"
exit 1
fi fi
#-------------------------------------------------- #--------------------------------------------------
@ -25,49 +31,145 @@ fi
#-------------------------------------------------- #--------------------------------------------------
echo -e "\n---- Update Server ----" echo -e "\n---- Update Server ----"
# add-apt-repository can install add-apt-repository Ubuntu 18.x if [ "18.04" == "${UBUNTU_VERSION}" ]; then
sudo apt-get install software-properties-common curl -y # add-apt-repository can install add-apt-repository Ubuntu 18.x
# universe package is for Ubuntu 18.x sudo apt-get install software-properties-common curl -y
sudo add-apt-repository universe # universe package is for Ubuntu 18.x
# libpng12-0 dependency for wkhtmltopdf sudo add-apt-repository universe
sudo add-apt-repository "deb http://mirrors.kernel.org/ubuntu/ xenial main" # libpng12-0 dependency for wkhtmltopdf
sudo apt-get update sudo add-apt-repository "deb http://mirrors.kernel.org/ubuntu/ xenial main"
sudo apt-get upgrade -y sudo apt-get update
sudo apt-get upgrade -y
fi
#-------------------------------------------------- #--------------------------------------------------
# Install PostgreSQL Server # Install PostgreSQL Server
#-------------------------------------------------- #--------------------------------------------------
echo -e "\n---- Install PostgreSQL Server ----" echo -e "\n---- Install PostgreSQL Server ----"
sudo apt-get install postgresql libpq-dev postgis -y sudo apt-get install postgresql libpq-dev postgis -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get install postgresql installation error."
exit 1
fi
echo -e "\n---- Creating the ERPLibre PostgreSQL User ----" echo -e "\n---- Creating the ERPLibre PostgreSQL User ----"
sudo su - postgres -c "createuser -s ${EL_USER}" 2> /dev/null || true sudo su - postgres -c "createuser -s ${EL_USER}" 2>/dev/null || true
#-------------------------------------------------- #--------------------------------------------------
# Install Dependencies # Install Dependencies
#-------------------------------------------------- #--------------------------------------------------
echo -e "\n--- Installing debian dependency --" echo -e "\n--- Installing debian dependency --"
sudo apt-get install git build-essential wget libxslt-dev libzip-dev libldap2-dev libsasl2-dev libpng12-0 gdebi-core libffi-dev libbz2-dev parallel -y sudo apt-get install git build-essential wget libxslt-dev libzip-dev libldap2-dev libsasl2-dev gdebi-core libffi-dev libbz2-dev parallel -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get debian tool installation error."
exit 1
fi
sudo apt-get install libmariadbd-dev -y sudo apt-get install libmariadbd-dev -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get libmariadb installation error."
exit 1
fi
if [ "18.04" == "${UBUNTU_VERSION}" ]; then
sudo apt-get install libpng12-0 -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get libpng installation error."
exit 1
fi
fi
# Dependencies for pyenv # Dependencies for pyenv
sudo apt-get install make libssl-dev zlib1g-dev libreadline-dev libsqlite3-dev curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev liblzma-dev -y sudo apt-get install make libssl-dev zlib1g-dev libreadline-dev libsqlite3-dev curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev liblzma-dev -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get pyenv dependencies installation error."
exit 1
fi
echo -e "\n---- Installing nodeJS NPM and rtlcss for LTR support ----" echo -e "\n---- Installing nodeJS NPM and rtlcss for LTR support ----"
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - if [ "18.04" == "${UBUNTU_VERSION}" ]; then
sudo apt-get install -y nodejs sudo apt remove nodeJS npm
sudo npm install npm@latest -g curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
sudo npm install -g rtlcss chmod +x ~/.nvm/nvm.sh
sudo npm install -g less . $NVM_DIR/nvm.sh && nvm install 16.15.1
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "nvm installation error."
exit 1
fi
source ~/.bashrc
npm install npm@latest -g
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install npm lastest installation error."
exit 1
fi
npm install -g rtlcss
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install rtlcss installation error."
exit 1
fi
npm install -g less
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install less installation error."
exit 1
fi
else
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt-get nodejs installation error."
exit 1
fi
sudo npm install npm@latest -g
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install npm lastest installation error."
exit 1
fi
sudo npm install -g rtlcss
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install rtlcss installation error."
exit 1
fi
sudo npm install -g less
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install less installation error."
exit 1
fi
fi
echo -e "\n---- Test tool ----" echo -e "\n---- Test tool ----"
sudo npm install -g prettier sudo npm install -g prettier
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install prettier installation error."
exit 1
fi
sudo npm install -g prettier @prettier/plugin-xml sudo npm install -g prettier @prettier/plugin-xml
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "npm install prettier plugin-xml installation error."
exit 1
fi
sudo ln -fs /usr/local/bin/lessc /usr/bin/lessc sudo ln -fs /usr/local/bin/lessc /usr/bin/lessc
if [ ${EL_INSTALL_NGINX} = "True" ]; then if [ ${EL_INSTALL_NGINX} = "True" ]; then
echo -e "\n---- Installing nginx ----" echo -e "\n---- Installing nginx ----"
sudo apt install nginx -y sudo apt install nginx -y
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "apt install nginx installation error."
exit 1
fi
fi fi
#-------------------------------------------------- #--------------------------------------------------
@ -75,15 +177,21 @@ fi
#-------------------------------------------------- #--------------------------------------------------
if [ ${EL_INSTALL_WKHTMLTOPDF} = "True" ]; then if [ ${EL_INSTALL_WKHTMLTOPDF} = "True" ]; then
echo -e "\n---- Installing wkhtml ----" echo -e "\n---- Installing wkhtml ----"
INSTALLED=$(dpkg -s wkhtmltox|grep installed) INSTALLED=$(dpkg -s wkhtmltox | grep installed)
if [ "" == "${INSTALLED}" ]; then if [ "" == "${INSTALLED}" ]; then
echo -e "\n---- Install wkhtml and place shortcuts on correct place ----" echo -e "\n---- Install wkhtml and place shortcuts on correct place ----"
_url=${WKHTMLTOX_X64} _url=${WKHTMLTOX_X64}
sudo wget ${_url} sudo wget ${_url}
sudo gdebi --n `basename ${_url}` sudo gdebi --n $(basename ${_url})
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin retVal=$?
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin if [[ $retVal -ne 0 ]]; then
else echo -e "\n---- Already installed wkhtml ----" echo "gdebi install wkhtmltopdf installation error."
exit 1
fi
sudo ln -fs /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -fs /usr/local/bin/wkhtmltoimage /usr/bin
else
echo -e "\n---- Already installed wkhtml ----"
fi fi
else else
echo "Wkhtmltopdf isn't installed due to the choice of the user!" echo "Wkhtmltopdf isn't installed due to the choice of the user!"

View file

@ -4,14 +4,17 @@ if [[ "${OSTYPE}" == "linux-gnu" ]]; then
OS=$(lsb_release -si) OS=$(lsb_release -si)
VERSION=$(cat /etc/issue) VERSION=$(cat /etc/issue)
if [[ "${OS}" == "Ubuntu" ]]; then if [[ "${OS}" == "Ubuntu" ]]; then
if [[ "${VERSION}" == Ubuntu\ 18.04* || "${VERSION}" == Ubuntu\ 20.04* ]]; then if [[ "${VERSION}" == Ubuntu\ 18.04* || "${VERSION}" == Ubuntu\ 20.04* || "${VERSION}" == Ubuntu\ 22.04* ]]; then
echo "\n---- linux-gnu installation process started ----" echo "\n---- linux-gnu installation process started ----"
./script/install_debian_dependency.sh ./script/install_debian_dependency.sh
else else
echo "Your version is not supported, only support 18.04 and 20.04 : ${VERSION}" echo "Your version is not supported, only support 18.04, 20.04 and 22.04 : ${VERSION}"
fi fi
elif [[ "${OS}" == "Debian" ]]; then
./script/install_debian_dependency.sh
else else
echo "Your Linux system is not supported, only support Ubuntu 18.04 or Ubuntu 20.04." ./script/install_debian_dependency.sh
echo "Your Linux system is not supported, only support Ubuntu 18.04 or Ubuntu 20.04 or Ubuntu 22.04."
fi fi
elif [[ "${OSTYPE}" == "darwin"* ]]; then elif [[ "${OSTYPE}" == "darwin"* ]]; then
echo "\n---- Darwin installation process started ----" echo "\n---- Darwin installation process started ----"

View file

@ -25,15 +25,16 @@ if [[ ! -d "./addons/addons" ]]; then
fi fi
PYENV_PATH=~/.pyenv PYENV_PATH=~/.pyenv
PYTHON_VERSION=3.7.12 PYTHON_VERSION=3.7.16
PYENV_VERSION_PATH=${PYENV_PATH}/versions/${PYTHON_VERSION} PYENV_VERSION_PATH=${PYENV_PATH}/versions/${PYTHON_VERSION}
PYTHON_EXEC=${PYENV_VERSION_PATH}/bin/python PYTHON_EXEC=${PYENV_VERSION_PATH}/bin/python
POETRY_PATH=~/.poetry
VENV_PATH=./.venv VENV_PATH=./.venv
LOCAL_PYTHON_EXEC=${VENV_PATH}/bin/python LOCAL_PYTHON_EXEC=${VENV_PATH}/bin/python
VENV_REPO_PATH=${VENV_PATH}/repo VENV_REPO_PATH=${VENV_PATH}/repo
VENV_MULTILINGUAL_MARKDOWN_PATH=${VENV_PATH}/multilang_md.py VENV_MULTILINGUAL_MARKDOWN_PATH=${VENV_PATH}/multilang_md.py
POETRY_VERSION=1.1.14 #POETRY_PATH=~/.local/bin/poetry
POETRY_PATH=${VENV_PATH}/bin/poetry
POETRY_VERSION=1.3.1
echo "Python path version home" echo "Python path version home"
echo ${PYENV_VERSION_PATH} echo ${PYENV_VERSION_PATH}
@ -76,13 +77,12 @@ if [[ ! -d ${VENV_PATH} ]]; then
fi fi
fi fi
if [[ ! -d "${POETRY_PATH}" ]]; then #if [[ ! -d "${POETRY_PATH}" ]]; then
# Delete directory ~/.poetry and .venv to force update to new version # # Delete directory ~/.poetry and .venv to force update to new version
echo -e "\n---- Installing poetry for reliable python package ----" # echo -e "\n---- Installing poetry ${LOCAL_PYTHON_EXEC} for reliable python package ----"
# curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | ${PYTHON_EXEC} # # TODO self update poetry with `poetry self update ${POETRY_VERSION}`
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py # curl -sSL https://install.python-poetry.org | POETRY_VERSION=${POETRY_VERSION} ${LOCAL_PYTHON_EXEC} - -y
${LOCAL_PYTHON_EXEC} get-poetry.py -y --preview --version ${POETRY_VERSION} #fi
fi
# Install git-repo if missing # Install git-repo if missing
if [[ ! -f ${VENV_REPO_PATH} ]]; then if [[ ! -f ${VENV_REPO_PATH} ]]; then
@ -110,12 +110,27 @@ ${VENV_PATH}/bin/pip install --upgrade pip
#/home/"${USER}"/.poetry/bin/poetry env use ${LOCAL_PYTHON_EXEC} #/home/"${USER}"/.poetry/bin/poetry env use ${LOCAL_PYTHON_EXEC}
# source $HOME/.poetry/env # source $HOME/.poetry/env
#${LOCAL_PYTHON_EXEC} ~/.poetry/bin/poetry env use ${VENV_PATH}/bin/python3 #${LOCAL_PYTHON_EXEC} ~/.poetry/bin/poetry env use ${VENV_PATH}/bin/python3
${LOCAL_PYTHON_EXEC} ~/.poetry/bin/poetry install #${LOCAL_PYTHON_EXEC} ~/.poetry/bin/poetry install
retVal=$? #${POETRY_PATH} install
if [[ $retVal -ne 0 ]]; then
echo "Poetry installation error." # Delete artifacts created by pip, cause error in next "poetry install"
exit 1 if [[ ! -f "${POETRY_PATH}" ]]; then
${VENV_PATH}/bin/pip install poetry==${POETRY_VERSION}
${VENV_PATH}/bin/poetry --version
${VENV_PATH}/bin/poetry lock --no-update
${VENV_PATH}/bin/poetry install
retVal=$?
if [[ $retVal -ne 0 ]]; then
echo "Poetry installation error."
exit 1
fi
# Fix broken poetry by installing ignored dependence
${VENV_PATH}/bin/pip install vatnumber
${VENV_PATH}/bin/pip install suds-jurko
fi fi
${VENV_PATH}/bin/pip install vatnumber
${VENV_PATH}/bin/pip install suds-jurko
# Delete artifacts created by pip, cause error in next "poetry install" # Delete artifacts created by pip, cause error in next "poetry install"
rm -rf artifacts rm -rf artifacts

View file

@ -11,6 +11,7 @@ import time
import uuid import uuid
from collections import deque from collections import deque
from typing import Tuple from typing import Tuple
import git
import aioshutil import aioshutil
from colorama import Fore from colorama import Fore
@ -628,9 +629,9 @@ async def test_exec(
test_result += res test_result += res
test_status += status test_status += status
test_generated_path = ( # test_generated_path = (
install_path if destination_path is None else new_destination_path # install_path if destination_path is None else new_destination_path
) # )
test_generated_path = ( test_generated_path = (
destination_path if use_test_path_generic else install_path destination_path if use_test_path_generic else install_path
) )
@ -930,6 +931,28 @@ async def run_code_generator_website_snippet_test(config) -> Tuple[str, int]:
test_result += res test_result += res
test_status += status test_status += status
if "code_generator_demo_website_multiple_snippet" in lst_tested_module:
# Because code_generator_demo_website_multiple_snippet depend on code_generator_demo_portal, it will
# execute it and this delete file demo_portal/i18n/demo_portal.pot and demo_portal/i18n/fr_CA.po
lst_file_is_delete = [
"demo_portal/i18n/demo_portal.pot",
"demo_portal/i18n/fr_CA.po",
]
path_to_check = os.path.join(
"addons", "TechnoLibre_odoo-code-generator-template"
)
repo_demo_portal = git.Repo(path_to_check)
status_to_check = repo_demo_portal.git.status("-s")
if all([f"D {a}" in status_to_check for a in lst_file_is_delete]):
# Revert it
for file_name in lst_file_is_delete:
repo_demo_portal.git.checkout(file_name)
else:
test_status += 1
test_result += (
f"\n\nFAIL - inspect to delete file ${lst_file_is_delete}"
)
return test_result, test_status return test_result, test_status
@ -1193,7 +1216,7 @@ def run_all_test(config) -> None:
run_code_generator_template_demo_internal_inherit_test(config), run_code_generator_template_demo_internal_inherit_test(config),
run_code_generator_template_demo_sysadmin_cron_test(config), run_code_generator_template_demo_sysadmin_cron_test(config),
run_code_generator_demo_test(config), run_code_generator_demo_test(config),
# Begin run generic test # Begin to run generic test
# run_code_generator_generic_all_test(config), # run_code_generator_generic_all_test(config),
run_code_generator_data_test(config), run_code_generator_data_test(config),
run_code_generator_export_website_attachments_test(config), run_code_generator_export_website_attachments_test(config),

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# $1 new version version, like 3.7.12 # $1 new version version, like 3.7.16
input=".python-version" input=".python-version"
while IFS= read -r line while IFS= read -r line

View file

@ -83,7 +83,7 @@ https://github.com/OCA/web.git,addons,,
https://github.com/OCA/website.git,addons,12.0_dev, https://github.com/OCA/website.git,addons,12.0_dev,
https://github.com/OCA/wms.git,addons,, https://github.com/OCA/wms.git,addons,,
https://github.com/odoo/odoo.git,.,ERPLibre/12.0,10 https://github.com/odoo/odoo.git,.,ERPLibre/12.0,10
https://github.com/odooaktiv/QuotationRevision.git,addons,, https://github.com/MathBenTech/QuotationRevision.git,addons,,
https://github.com/openeducat/openeducat_erp.git,addons,, https://github.com/openeducat/openeducat_erp.git,addons,,
https://github.com/Smile-SA/odoo_addons.git,addons,12.0_remote_autoinstall, https://github.com/Smile-SA/odoo_addons.git,addons,12.0_remote_autoinstall,
https://github.com/odooaktiv/product_rating_app.git,addons,, https://github.com/odooaktiv/product_rating_app.git,addons,,
@ -123,7 +123,7 @@ https://github.com/OCA/connector.git,addons,,
https://github.com/itpp-labs/odoo-development.git,doc,master, https://github.com/itpp-labs/odoo-development.git,doc,master,
https://github.com/itpp-labs/odoo-port-docs.git,doc,master, https://github.com/itpp-labs/odoo-port-docs.git,doc,master,
https://github.com/itpp-labs/odoo-test-docs.git,doc,master, https://github.com/itpp-labs/odoo-test-docs.git,doc,master,
https://github.com/odoo/documentation-user.git,doc,, https://github.com/odoo/documentation.git,doc,,
https://github.com/OCA/odoo-module-migrator.git,script,master, https://github.com/OCA/odoo-module-migrator.git,script,master,
https://github.com/OCA/maintainer-tools.git,script,master, https://github.com/OCA/maintainer-tools.git,script,master,
https://github.com/TechnoLibre/odoo-code-generator.git,addons,, https://github.com/TechnoLibre/odoo-code-generator.git,addons,,

1 url path revision clone-depth
83 https://github.com/OCA/website.git addons 12.0_dev
84 https://github.com/OCA/wms.git addons
85 https://github.com/odoo/odoo.git . ERPLibre/12.0 10
86 https://github.com/odooaktiv/QuotationRevision.git https://github.com/MathBenTech/QuotationRevision.git addons
87 https://github.com/openeducat/openeducat_erp.git addons
88 https://github.com/Smile-SA/odoo_addons.git addons 12.0_remote_autoinstall
89 https://github.com/odooaktiv/product_rating_app.git addons
123 https://github.com/itpp-labs/odoo-development.git doc master
124 https://github.com/itpp-labs/odoo-port-docs.git doc master
125 https://github.com/itpp-labs/odoo-test-docs.git doc master
126 https://github.com/odoo/documentation-user.git https://github.com/odoo/documentation.git doc
127 https://github.com/OCA/odoo-module-migrator.git script master
128 https://github.com/OCA/maintainer-tools.git script master
129 https://github.com/TechnoLibre/odoo-code-generator.git addons