Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odoo-15: wkhtmltopdf - account payment - permissions #4

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh text eol=lf
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ DOCKER CONTAINER
- `docker ps` Show running containers
- `docker ps -a` Show all containers
- `docker exec -it <container-name or id> bash` Opens the shell of the container
- `docker exec -it -u 0 <container-name or id> bash` Opens the shell of the container as root user
- `docker container rm <container-name or id>` Remove the specified container
- `docker create <image-name>` Create a container based on the image
- `docker create --name <container-name> <image-name>` Create a container with the specified name based on the image
Expand Down
21 changes: 13 additions & 8 deletions odoo-15/odoo-prod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ RUN set -x; \
libxrender1 \
xfonts-75dpi \
xfonts-base \
&& curl -o wkhtmltox.deb -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb \
&& echo 'f1689a1b302ff102160f2693129f789410a1708a wkhtmltox.deb' | sha1sum -c - \
&& dpkg --force-depends -i wkhtmltox.deb\
&& apt-get -y install -f --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* wkhtmltox. \
&& wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
&& dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb \
&& echo 'ae4e85641f004a2097621787bf4381e962fb91e1 wkhtmltox.deb' | sha1sum -c - \
&& apt install -y --no-install-recommends ./wkhtmltox.deb \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb \
&& apt install libssl-dev build-essential zlib1g-dev \
&& curl -o Python-3.8.10.tgz -SL https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz \
&& tar xzf Python-3.8.10.tgz \
Expand All @@ -80,8 +81,8 @@ RUN useradd --create-home --home-dir /opt/odoo --no-log-init odoo
RUN echo "odoo:odoo" | chpasswd

# Copy Odoo configuration & entrypoint files
COPY ./odoo.conf /opt/odoo
COPY ./entrypoint.sh /opt/odoo
COPY --chown="odoo:odoo" ./odoo.conf /opt/odoo
COPY --chown="odoo:odoo" ./entrypoint.sh /opt/odoo

# Install latest postgresql-client
RUN apt-get update \
Expand All @@ -105,14 +106,15 @@ RUN /bin/bash -c "mkdir -p /opt/odoo/custom-addons"
# Create Virtual Enviroment
RUN /bin/bash -c "cd /opt/odoo && virtualenv -p python3.8 venv"

# Python dependencies
# Python dependencies, specific library versions to fix dependences error
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && deactivate"

# Clone interesting OCA repositories
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-analytic -b 15.0 --single-branch --depth 1 account-analytic"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-financial-reporting -b 15.0 --single-branch --depth 1 account-financial-reporting"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-financial-tools -b 15.0 --single-branch --depth 1 account-financial-tools"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-invoicing -b 15.0 --single-branch --depth 1 account-invoicing"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-payment -b 15.0 --single-branch --depth 1 account-payment"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/bank-payment -b 15.0 --single-branch --depth 1 bank-payment"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/community-data-files -b 15.0 --single-branch --depth 1 community-data-files"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/connector -b 15.0 --single-branch --depth 1 connector"
Expand Down Expand Up @@ -144,6 +146,7 @@ RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA
#OCA Dependencies
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/account-financial-tools/requirements.txt && deactivate"
# RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/bank-payment/requirements.txt && deactivate"
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/account-payment/requirements.txt && deactivate"
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/community-data-files/requirements.txt && deactivate"
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/connector/requirements.txt && deactivate"
# RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/edi/requirements.txt && deactivate"
Expand All @@ -155,6 +158,8 @@ RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /op
# RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/web/requirements.txt && deactivate"
# RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/server-tools/requirements.txt && deactivate"

RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip3 install -U cryptography==38.0.2 && pip3 install -U pyopenssl==23.2.0 && pip3 install -U requests-pkcs12==1.16 && deactivate"

VOLUME ["/opt/odoo"]

# Expose Odoo services
Expand Down
6 changes: 3 additions & 3 deletions odoo-15/odoo-prod/odoo.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[options]
addons_path = /opt/odoo/odoo/addons,/opt/odoo/custom-addons/web,/opt/odoo/custom-addons/account-analytic,/opt/odoo/custom-addons/account-financial-reporting,/opt/odoo/custom-addons/account-financial-tools,/opt/odoo/custom-addons/account-invoicing,/opt/odoo/custom-addons/bank-payment,/opt/odoo/custom-addons/community-data-files,/opt/odoo/custom-addons/connector,/opt/odoo/custom-addons/crm,/opt/odoo/custom-addons/e-commerce,/opt/odoo/custom-addons/edi,/opt/odoo/custom-addons/field-service,/opt/odoo/custom-addons/l10n-spain,/opt/odoo/custom-addons/mis-builder,/opt/odoo/custom-addons/partner-contact,/opt/odoo/custom-addons/pos,/opt/odoo/custom-addons/product-attribute,/opt/odoo/custom-addons/purchase-reporting,/opt/odoo/custom-addons/purchase-workflow,/opt/odoo/custom-addons/queue,/opt/odoo/custom-addons/reporting-engine,/opt/odoo/custom-addons/sale-financial,/opt/odoo/custom-addons/sale-reporting,/opt/odoo/custom-addons/sale-workflow,/opt/odoo/custom-addons/server-ux,/opt/odoo/custom-addons/server-tools,/opt/odoo/custom-addons/stock-logistics-barcode,/opt/odoo/custom-addons/stock-logistics-reporting,/opt/odoo/custom-addons/stock-logistics-warehouse,/opt/odoo/custom-addons/stock-logistics-workflow,/opt/odoo/custom-addons/timesheet
addons_path = /opt/odoo/odoo/addons,/opt/odoo/custom-addons/web,/opt/odoo/custom-addons/account-analytic,/opt/odoo/custom-addons/account-payment,/opt/odoo/custom-addons/account-financial-reporting,/opt/odoo/custom-addons/account-financial-tools,/opt/odoo/custom-addons/account-invoicing,/opt/odoo/custom-addons/bank-payment,/opt/odoo/custom-addons/community-data-files,/opt/odoo/custom-addons/connector,/opt/odoo/custom-addons/crm,/opt/odoo/custom-addons/e-commerce,/opt/odoo/custom-addons/edi,/opt/odoo/custom-addons/field-service,/opt/odoo/custom-addons/l10n-spain,/opt/odoo/custom-addons/mis-builder,/opt/odoo/custom-addons/partner-contact,/opt/odoo/custom-addons/pos,/opt/odoo/custom-addons/product-attribute,/opt/odoo/custom-addons/purchase-reporting,/opt/odoo/custom-addons/purchase-workflow,/opt/odoo/custom-addons/queue,/opt/odoo/custom-addons/reporting-engine,/opt/odoo/custom-addons/sale-financial,/opt/odoo/custom-addons/sale-reporting,/opt/odoo/custom-addons/sale-workflow,/opt/odoo/custom-addons/server-ux,/opt/odoo/custom-addons/server-tools,/opt/odoo/custom-addons/stock-logistics-barcode,/opt/odoo/custom-addons/stock-logistics-reporting,/opt/odoo/custom-addons/stock-logistics-warehouse,/opt/odoo/custom-addons/stock-logistics-workflow,/opt/odoo/custom-addons/timesheet
data_dir = /opt/odoo/odoo
log_level = info
; admin_passwd =
Expand All @@ -17,7 +17,7 @@ db_password = odoo
; email_from = False
; geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb
; http_enable = True
; http_interface =
http_interface = 0.0.0.0
; http_port = 8069
; import_partial =
limit_memory_hard = 4294967296
Expand All @@ -39,7 +39,7 @@ logfile = /opt/odoo/logs/odoo.log
; osv_memory_count_limit = False
; pg_path = None
; pidfile = False
; proxy_mode = False
proxy_mode = True
; reportgz = False
; server_wide_modules = web
; smtp_password = False
Expand Down
29 changes: 17 additions & 12 deletions odoo-15/odoo-test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ RUN set -x; \
libxrender1 \
xfonts-75dpi \
xfonts-base \
&& curl -o wkhtmltox.deb -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb \
&& echo 'f1689a1b302ff102160f2693129f789410a1708a wkhtmltox.deb' | sha1sum -c - \
&& dpkg --force-depends -i wkhtmltox.deb\
&& apt-get -y install -f --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* wkhtmltox. \
&& wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
&& dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb \
&& echo 'ae4e85641f004a2097621787bf4381e962fb91e1 wkhtmltox.deb' | sha1sum -c - \
&& apt install -y --no-install-recommends ./wkhtmltox.deb \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb \
&& apt install libssl-dev build-essential zlib1g-dev \
&& curl -o Python-3.8.10.tgz -SL https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz \
&& tar xzf Python-3.8.10.tgz \
Expand All @@ -80,8 +81,8 @@ RUN useradd --create-home --home-dir /opt/odoo --no-log-init odoo
RUN echo "odoo:odoo" | chpasswd

# Copy Odoo configuration & entrypoint files
COPY ./odoo.conf /opt/odoo
COPY ./entrypoint.sh /opt/odoo
COPY --chown="odoo:odoo" ./odoo.conf /opt/odoo
COPY --chown="odoo:odoo" ./entrypoint.sh /opt/odoo

# Install latest postgresql-client
RUN apt-get update \
Expand All @@ -102,11 +103,18 @@ USER odoo
RUN /bin/bash -c "cd /opt/odoo && git clone https://github.com/odoo/odoo --branch 15.0 --single-branch --depth 1"
RUN /bin/bash -c "mkdir -p /opt/odoo/custom-addons"

# Create Virtual Enviroment
RUN /bin/bash -c "cd /opt/odoo && virtualenv -p python3.8 venv"

# Python dependencies, specific library versions to fix dependences error
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && deactivate"

# Clone interesting OCA repositories
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-analytic -b 15.0 --single-branch --depth 1 account-analytic"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-financial-reporting -b 15.0 --single-branch --depth 1 account-financial-reporting"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-financial-tools -b 15.0 --single-branch --depth 1 account-financial-tools"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-invoicing -b 15.0 --single-branch --depth 1 account-invoicing"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/account-payment -b 15.0 --single-branch --depth 1 account-payment"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/bank-payment -b 15.0 --single-branch --depth 1 bank-payment"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/community-data-files -b 15.0 --single-branch --depth 1 community-data-files"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/connector -b 15.0 --single-branch --depth 1 connector"
Expand Down Expand Up @@ -135,12 +143,10 @@ RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/timesheet -b 15.0 --single-branch --depth 1 timesheet"
RUN /bin/bash -c "cd /opt/odoo/custom-addons && git clone https://github.com/OCA/web -b 15.0 --single-branch --depth 1 web"

# Create Virtual Enviroment
RUN /bin/bash -c "cd /opt/odoo && virtualenv -p python3.8 venv"

#OCA Dependencies
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/account-financial-tools/requirements.txt && deactivate"
# RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/bank-payment/requirements.txt && deactivate"
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/account-payment/requirements.txt && deactivate"
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/community-data-files/requirements.txt && deactivate"
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/connector/requirements.txt && deactivate"
# RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/edi/requirements.txt && deactivate"
Expand All @@ -152,8 +158,7 @@ RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /op
# RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/web/requirements.txt && deactivate"
# RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -r /opt/odoo/custom-addons/server-tools/requirements.txt && deactivate"

# Python dependencies
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip install -U setuptools && pip3 install -r /opt/odoo/odoo/requirements.txt && deactivate"
RUN /bin/bash -c "cd /opt/odoo && source venv/bin/activate && pip3 install -U cryptography==38.0.2 && pip3 install -U pyopenssl==23.2.0 && pip3 install -U requests-pkcs12==1.16 && deactivate"

VOLUME ["/opt/odoo"]

Expand Down
6 changes: 3 additions & 3 deletions odoo-15/odoo-test/odoo.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[options]
addons_path = /opt/odoo/odoo/addons,/opt/odoo/custom-addons/web,/opt/odoo/custom-addons/account-analytic,/opt/odoo/custom-addons/account-financial-reporting,/opt/odoo/custom-addons/account-financial-tools,/opt/odoo/custom-addons/account-invoicing,/opt/odoo/custom-addons/bank-payment,/opt/odoo/custom-addons/community-data-files,/opt/odoo/custom-addons/connector,/opt/odoo/custom-addons/crm,/opt/odoo/custom-addons/e-commerce,/opt/odoo/custom-addons/edi,/opt/odoo/custom-addons/field-service,/opt/odoo/custom-addons/l10n-spain,/opt/odoo/custom-addons/mis-builder,/opt/odoo/custom-addons/partner-contact,/opt/odoo/custom-addons/pos,/opt/odoo/custom-addons/product-attribute,/opt/odoo/custom-addons/purchase-reporting,/opt/odoo/custom-addons/purchase-workflow,/opt/odoo/custom-addons/queue,/opt/odoo/custom-addons/reporting-engine,/opt/odoo/custom-addons/sale-financial,/opt/odoo/custom-addons/sale-reporting,/opt/odoo/custom-addons/sale-workflow,/opt/odoo/custom-addons/server-ux,/opt/odoo/custom-addons/server-tools,/opt/odoo/custom-addons/stock-logistics-barcode,/opt/odoo/custom-addons/stock-logistics-reporting,/opt/odoo/custom-addons/stock-logistics-warehouse,/opt/odoo/custom-addons/stock-logistics-workflow,/opt/odoo/custom-addons/timesheet
addons_path = /opt/odoo/odoo/addons,/opt/odoo/custom-addons/web,/opt/odoo/custom-addons/account-analytic,/opt/odoo/custom-addons/account-payment,/opt/odoo/custom-addons/account-financial-reporting,/opt/odoo/custom-addons/account-financial-tools,/opt/odoo/custom-addons/account-invoicing,/opt/odoo/custom-addons/bank-payment,/opt/odoo/custom-addons/community-data-files,/opt/odoo/custom-addons/connector,/opt/odoo/custom-addons/crm,/opt/odoo/custom-addons/e-commerce,/opt/odoo/custom-addons/edi,/opt/odoo/custom-addons/field-service,/opt/odoo/custom-addons/l10n-spain,/opt/odoo/custom-addons/mis-builder,/opt/odoo/custom-addons/partner-contact,/opt/odoo/custom-addons/pos,/opt/odoo/custom-addons/product-attribute,/opt/odoo/custom-addons/purchase-reporting,/opt/odoo/custom-addons/purchase-workflow,/opt/odoo/custom-addons/queue,/opt/odoo/custom-addons/reporting-engine,/opt/odoo/custom-addons/sale-financial,/opt/odoo/custom-addons/sale-reporting,/opt/odoo/custom-addons/sale-workflow,/opt/odoo/custom-addons/server-ux,/opt/odoo/custom-addons/server-tools,/opt/odoo/custom-addons/stock-logistics-barcode,/opt/odoo/custom-addons/stock-logistics-reporting,/opt/odoo/custom-addons/stock-logistics-warehouse,/opt/odoo/custom-addons/stock-logistics-workflow,/opt/odoo/custom-addons/timesheet
data_dir = /opt/odoo/odoo
log_level = info
; admin_passwd =
Expand All @@ -17,7 +17,7 @@ db_password = odoo
; email_from = False
; geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb
; http_enable = True
; http_interface =
http_interface = 0.0.0.0
; http_port = 8069
; import_partial =
limit_memory_hard = 4294967296
Expand All @@ -39,7 +39,7 @@ logfile = /opt/odoo/logs/odoo.log
; osv_memory_count_limit = False
; pg_path = None
; pidfile = False
; proxy_mode = False
proxy_mode = True
; reportgz = False
; server_wide_modules = web
; smtp_password = False
Expand Down