[FIX] viin_backend_theme: complete dark-mode AA coverage (opt-in, backend) + keep public login light
Dark mode is a LOGGED-IN per-user choice applied to the backend only; public pages and the
default state stay LIGHT. Two parts:
1. Public/default-light: remove login.scss's `@media (prefers-color-scheme: dark)` block - the
PUBLIC pre-auth login must not darken from the visitor's OS. The login now always renders the
light split-screen. Guard test_public_login_never_os_darkens bans re-adding it.
2. Complete the backend dark-mode AA coverage the earlier commit started, all dark-scoped
([data-bs-theme=dark]) so light mode is untouched. Odoo 19 CE core dark mode leaves many
surfaces on compiled light values that never scheme-flip; re-point them to the runtime scheme
props at the layer each is read:
- Backgrounds via the core CSS var (fixes the whole family at once): grouped-kanban
--Kanban-background/--KanbanGroup-background; form o2m list --ListRenderer-thead/tfoot-bg-color;
breadcrumb --breadcrumb-bg; a GLOBAL .bg-view --background-color flip (view-surface utility on
~14 surfaces incl. search panel + calendar container + inputs) - beats .bg-view's !important
WITHOUT an !important war since re-pointing its own local var; messaging systray
--mail-MessagingMenu-bg (core set it light in its OWN dark stylesheet); search-panel list-group.
- Text utilities compiled light + !important: .text-body/.text-muted/.text-900 relit WITH
!important (sparing .btn-light/.btn-secondary light chips); --body-color-rgb flipped for dark.
- Per-surface: search-panel active row (core hardcodes .text-black), field-selector chain part,
pivot cells/headers (beat core's o-hover-text-color mixin), chatter header, command-palette
footer, settings form (--settings__* vars + .settings bg + section titles).
- Calendar: re-point --fc-* tokens on the .fc element itself (FullCalendar declares them there,
so an ancestor rule loses) -> dark grid + readable day names/dates.
- .o_web_client color-scheme: correct core's invalid 'bright' ident to light/dark per the app
toggle (fixes native scrollbars/controls + the getComputedStyle skew).
REVERTED a mis-step from the prior iteration: a global .text-success/.text-info dark flip that,
being unscoped, lost contrast on light surfaces (selected rows/subtle alerts) - core's marginal
~3.7-3.9:1 values are accepted known-minors (like white-on-color badges), not regressed.
Live getComputedStyle-verified (the review browser runs force-dark, so screenshots are unreliable):
all primary daily screens (home/list/form/kanban/pivot/settings/dialog/dropdowns/command-palette/
search-panel/activities+messages menus/calendar/chatter) are AA-clean in dark, regression reverted,
0 console errors, light mode unchanged. ~24 source-invariant guards (TestReviewA11yFixes) protect
the intent; 52/52 theme tests green (Python /viin_backend_theme + Hoot bracket).
Odoo 19 Test Suite Using Docker
Check the quality with Pylint: from test_lint to test_pylint
- install_module test_lint,test_pylint
- exec_odoo --db_port 5432 --log-level=test --max-cron-threads=0 --load=base,web,to_base --stop-after-init --test-enable --test-tags=/test_lint,/test_pylint,/test_lint,/test_pylint,-:.test_pofiles_string_formatting
| Create Date | Level | Message |
|---|---|---|
| 07/26/2026 10:00:41 | INFO |
Using Docker Image Odoo 19 Ubuntu 24.04 Python 3.12:
FROM ubuntu:noble ENV LANG C.UTF-8 ENV ODOO_TEST_FAILURE_RETRIES=2 # Retrieve the target architecture to install the correct wkhtmltopdf package ARG TARGETARCH 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 file fonts-freefont-ttf fonts-noto-cjk gawk gnupg gsfonts libldap2-dev libjpeg9-dev libsasl2-dev libxslt1-dev lsb-release npm ocrmypdf sed sudo unzip xfonts-75dpi zip zlib1g-dev software-properties-common git \ && 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 publicsuffix python3 flake8 python3-dbfread python3-dev python3-gevent python3-pip python3-setuptools python3-wheel python3-markdown python3-mock python3-phonenumbers python3-websocket python3-google-auth libpq-dev pylint python3-jwt python3-asn1crypto python3-html2text python3-suds python3-xmlsec \ && rm -rf /var/lib/apt/lists/* # Install wkhtml RUN curl -o xfonts-base.deb http://archive.ubuntu.com/ubuntu/pool/main/x/xfonts-base/xfonts-base_1.0.5+nmu1_all.deb && dpkg -i xfonts-base.deb RUN curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb \ && apt-get install -y --no-install-recommends ./wkhtmltox.deb \ && rm -rf /var/lib/apt/lists/* wkhtmltox.deb xfonts-base.deb # 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/19.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 --break-system-packages --no-cache-dir setuptools wheel && \ python3 -m pip install --break-system-packages coverage==7.4.4 flamegraph # install latest postgresql-client RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ noble-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ && GNUPGHOME="$(mktemp -d)" \ && export GNUPGHOME \ && repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \ && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \ && gpg --batch --armor --export "${repokey}" > /etc/apt/trusted.gpg.d/pgdg.gpg.asc \ && gpgconf --kill all \ && rm -rf "$GNUPGHOME" \ && apt-get update \ && apt-get install --no-install-recommends -y postgresql-client \ && rm -f /etc/apt/sources.list.d/pgdg.list \ && rm -rf /var/lib/apt/lists/* # Install Google Chrome ARG CHROME_VERSION=150.0.7871.114 RUN set -eux; \ echo 'repo_add_once="false"' > /etc/default/google-chrome; \ curl -sSLf "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb" \ -o /tmp/chrome.deb; \ apt-get update; \ apt-get -y install --no-install-recommends /tmp/chrome.deb; \ apt-mark hold google-chrome-stable; \ rm -f /tmp/chrome.deb /etc/apt/sources.list.d/google-chrome.list; \ rm -rf /var/lib/apt/lists/*; \ google-chrome --version | grep -F "${CHROME_VERSION}" # 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 ENV PIP_BREAK_SYSTEM_PACKAGES=1 ADD https://raw.githubusercontent.com/Viindoo/odoo/19.0/requirements.txt /root/requirements.txt RUN python3 -m pip install --break-system-packages --no-cache-dir setuptools wheel && \ python3 -m pip install --break-system-packages --upgrade --force-reinstall --ignore-installed --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 --break-system-packages --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 \ && rm -rf /var/lib/apt/lists/* RUN python3 -m pip install --no-cache-dir --upgrade websocket-client==1.2.3 flake8==6.1.0 #RUN python3 -m pip uninstall pylint pylint-odoo isort Pygments -y RUN python3 -m pip install --break-system-packages --upgrade --force-reinstall --ignore-installed --no-cache-dir --upgrade pylint-odoo==9.0.5 RUN python3 -m pip install --break-system-packages --upgrade --force-reinstall --ignore-installed --no-cache-dir --upgrade Pygments==2.15.0 --no-deps # 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@3.4.0 es-check@6.0.0 eslint@8.57.1 prettier@2.7.1 eslint-config-prettier@8.5.0 eslint-plugin-prettier@4.2.1 # Tránh warning do bug của ubuntu RUN rm -rf /usr/lib/python3.12/dist-packages/charset_normalizer-3.3.2.dist-info # Install cloc package RUN set -x ; \ apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cloc \ && rm -rf /var/lib/apt/lists/* RUN python3 -m pip install --no-cache-dir --upgrade google-auth==2.36.0 RUN python3 -m pip install --no-cache --use-pep517 python-pkcs11~=0.7.0 |
| 07/26/2026 10:00:41 | INFO |
Check the quality with Pylint: from test_lint to test_pylint:
Command: install_module args: test_lint,test_pylint |
| 07/26/2026 10:00:41 | INFO |
Check the quality with Pylint: from test_lint to test_pylint:
Command: exec_odoo args: --db_port 5432 --log-level=test --max-cron-threads=0 --load=base,web,to_base --stop-after-init --test-enable --test-tags=/test_lint,/test_pylint,/test_lint,/test_pylint,-:.test_pofiles_string_formatting |
| 07/26/2026 10:00:41 | INFO |
Docker command:
cd /data/build; python3 -m pip install --user --progress-bar off -r Viindoo-tvtmaaddons-19.0/requirements.txt && python3 Viindoo-odoo-19.0/odoo-bin --addons-path Viindoo-odoo-19.0/odoo/addons,Viindoo-odoo-19.0/addons,Viindoo-tvtmaaddons-19.0,rb-8dac1d6-223370 -d rb-8dac1d6-223370-397926 --data-dir /data/build/datadir -i test_lint,test_pylint --db_port 5432 --log-level=test --max-cron-threads=0 --load=base,web,to_base --stop-after-init --test-enable --test-tags=/test_lint,/test_pylint,/test_lint,/test_pylint,-:.test_pofiles_string_formatting ; |
| 07/26/2026 10:00:41 | INFO |
Container rb-8dac1d6-223370-397926 started !
|
| 07/26/2026 10:20:52 | INFO |
Container rb-8dac1d6-223370-397926 stopped !
|
| 07/26/2026 10:20:52 | ERROR |
odoo.addons.test_lint.tests.test_manifests: FAIL: Subtest ManifestLinter.test_manifests (module='viin_backend_theme')
Traceback (most recent call last):
File "/data/build/Viindoo-odoo-19.0/odoo/addons/test_lint/tests/test_manifests.py", line 32, in test_manifests
self._test_manifest_values(manifest)
File "/data/build/Viindoo-odoo-19.0/odoo/addons/test_lint/tests/test_manifests.py", line 56, in _test_manifest_values
self.assertNotEqual(
AssertionError: False == False : Setting manifest key application to the default manifest value for module 'viin_backend_theme'. You can remove this key from the dict to reduce noise/inconsistencies between manifests specifications and ease understanding of manifest content.
|
| 07/26/2026 10:20:52 | ERROR |
odoo.modules.loading: Module test_lint: 1 failures, 0 errors of 25 tests
|
| 07/26/2026 10:20:52 | ERROR |
odoo.modules.loading: At least one test failed when loading the modules.
|
| 07/26/2026 10:20:52 | INFO |
Cleaning all resource
|
| 07/26/2026 10:20:52 | INFO |
Cleanup finished
|