[FIX] web_editor, mail, account_edi: add indexes to improve performance
when deleting ir_attachment records
On a DB with 15M+ attachments, deleting a single attachment takes
several seconds. Most of the time is spent on the circular `original_id`
and `message_main_attachment_id` foreign key.
| Subbuilds | Name | State | Detail |
|---|---|---|---|
| Build 355632 | At install tests: from account to website_twitter 123m | Succeed | Log |
| Build 355633 | Post install tests: step install all modules 47m | Succeed | Log |
| Build 355634 | Post install tests: from account to payment 89m | Succeed | Log |
| Build 355635 | Post install tests: from payment_adyen to to_account_payment 94m | Succeed | Log |
| Build 355636 | Post install tests: from to_account_reports to to_warranty_purchase 54m | Succeed | Log |
| Build 355637 | Post install tests: from to_warranty_purchase_stock to viin_features_activate_inter_company 35m | Succeed | Log |
| Build 355638 | Post install tests: from viin_features_activate_mrp to viin_purchase_approval 33m | Succeed | Log |
| Build 355639 | Post install tests: from viin_purchase_stock_backdate to website_twitter 43m | Succeed | Log |
| Create Date | Level | Message |
|---|---|---|
| 12/02/2025 16:45:33 | INFO |
Updated repository Viindoo-tvtmaaddons
|
| 12/02/2025 16:45:33 | INFO |
Updated repository Viindoo-erponline-enterprise
|
| 12/02/2025 16:45:33 | INFO |
Updated repository Viindoo-branding
|
| 12/02/2025 16:45:33 | INFO |
Cloned repository Viindoo-odoo
|
| 02/22/2023 15:08:15 |
Using Docker Image Odoo 16 Ubuntu 22.04 Python 3.10:
FROM ubuntu:jammy ENV LANG C.UTF-8 USER root SHELL ["/bin/bash", "-c"] # Install debian packages RUN set -x ; \ apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends apt-transport-https build-essential ca-certificates curl ffmpeg file fonts-freefont-ttf fonts-noto-cjk gawk gnupg gsfonts libldap2-dev libjpeg9-dev libsasl2-dev libxslt1-dev lsb-release node-less ocrmypdf sed sudo unzip xfonts-75dpi zip zlib1g-dev git build-essential cython3 libffi-dev libev-dev\ && rm -rf /var/lib/apt/lists/* # Install Python3 packages RUN set -x ; \ apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3 python3-dbfread python3-dev python3-pip python3-setuptools python3-wheel python3-markdown python3-mock python3-phonenumbers python3-websocket python3-cffi libpq-dev \ && rm -rf /var/lib/apt/lists/* # Install wkhtml RUN curl -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb -o /tmp/wkhtmltox_0.12.6-1.focal_amd64.deb \ && curl -sSL http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb -o /tmp/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \ && apt-get update \ && dpkg -i /tmp/libssl1.1_1.1.0g-2ubuntu4_amd64.deb \ && apt install -y -f --no-install-recommends /tmp/wkhtmltox_0.12.6-1.focal_amd64.deb \ && rm /tmp/libssl1.1_1.1.0g-2ubuntu4_amd64.deb /tmp/wkhtmltox_0.12.6-1.focal_amd64.deb # Install nodejs #RUN set -x ; \ # apt-get update \ # && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends nodejs npm \ # && rm -rf /var/lib/apt/lists/* #RUN npm install -g rtlcss es-check eslint # Install Odoo:Depends ADD https://raw.githubusercontent.com/brendangregg/FlameGraph/master/flamegraph.pl /usr/local/bin/flamegraph.pl RUN chmod +rx /usr/local/bin/flamegraph.pl ADD https://raw.githubusercontent.com/Viindoo/odoo/16.0/debian/control /tmp/control.txt RUN apt-get update \ && sed -n '/^Depends:/,/^[A-Z]/p' /tmp/control.txt \ | awk '/^ [a-z]/ { gsub(/,/,"") ; print $1 }' | sort -u \ | egrep -v 'postgresql-client' \ | sed 's/python-imaging/python-pil/' | sed 's/python-pypdf/python-pypdf2/' | sed 's/python3-lxml-html-clean/python3-lxml/' \ | DEBIAN_FRONTEND=noninteractive xargs apt-get install -y -qq \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* RUN python3 -m pip install --no-cache-dir setuptools wheel && \ python3 -m pip install coverage==4.5.4 flamegraph RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql-client-14 \ && rm -rf /var/lib/apt/lists/* # Install Google Chrome #RUN curl -sSL https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /tmp/chrome.deb \ # && apt-get update \ # && apt-get -y install --no-install-recommends /tmp/chrome.deb \ # && rm /tmp/chrome.deb # Install phantomjs RUN curl -sSL https://nightly.odoo.com/resources/phantomjs.tar.bz2 -o /tmp/phantomjs.tar.bz2 \ && tar xvfO /tmp/phantomjs.tar.bz2 phantomjs-2.1.1-linux-x86_64/bin/phantomjs > /usr/local/bin/phantomjs \ && chmod +x /usr/local/bin/phantomjs \ && rm -f /tmp/phantomjs.tar.bz2 ADD https://raw.githubusercontent.com/Viindoo/odoo/16.0/requirements.txt /root/requirements.txt RUN python3 -m pip install --no-cache-dir setuptools wheel && \ python3 -m pip install --no-cache-dir -r /root/requirements.txt && \ python3 -m pip install --no-cache-dir ebaysdk==2.1.5 pdf417gen==0.7.1 RUN python3 -m pip install --no-cache-dir requests pyOpenSSL # Install debian packages RUN set -x ; \ apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends openssl iputils-ping openssh-client chromium-browser cloc \ && rm -rf /var/lib/apt/lists/* RUN python3 -m pip install --no-cache-dir --upgrade wheel setuptools==60.0.0 RUN python3 -m pip install --no-cache-dir --upgrade websocket-client==1.2.3 flake8==4.0.1 RUN python3 -m pip uninstall pylint pylint-odoo isort Pygments -y RUN python3 -m pip install --no-cache-dir --upgrade pylint-odoo==5.0.0 RUN python3 -m pip install --no-cache-dir --upgrade Pygments==2.14.0 --no-deps RUN python3 -m pip install --no-cache-dir --upgrade odoo_test_helper # Install nodejs RUN curl -fsSLO --compressed "https://nodejs.org/dist/v18.20.0/node-v18.20.0-linux-x64.tar.xz" \ && tar -xJf "node-v18.20.0-linux-x64.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ && rm "node-v18.20.0-linux-x64.tar.xz" \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs RUN npm install -g rtlcss es-check eslint@8 |