server-brand icon indicating copy to clipboard operation
server-brand copied to clipboard

[19.0][ADD] web_debranding: add

Open tishmen opened this issue 2 months ago • 4 comments

Scope

  • web_debranding

Depends on

  • None

Summary

  • Backend debranding:
    • General Settings: remove the "About" block by dropping <div id='about'> via a safe view inherit.
    • Browser tab: blank the default title fallback by setting <title t-esc="title or ''"> in web.layout (using position="attributes", no full replace).
  • Avoid dangerous replaces:
    • Use position="attributes" for the title tweak.
    • When replacing the Settings block, set view priority=100.

Pre-commit

  • Ran locally; all hooks passed (prettier, ruff, pylint-odoo, OCA hooks).

Tests

  • Unit tests included:
    • Settings form: assert no About section (//div[@id='about'] absent).
    • Title fallback: assert empty when no title is provided, and exact value when provided.
  • Example run: ./odoo/odoo-bin -c odoo.conf -d <db> -i web_debranding --test-enable --stop-after-init

Review notes

  • This module focuses on backend debranding only. Portal debranding is in portal_odoo_debranding (PR #109). Website debranding lives in OCA/website (website_odoo_debranding), and can be migrated separately to keep dependencies optional.

tishmen avatar Oct 15 '25 07:10 tishmen

Hey @pedrobaeza! Quick summary of what this adds:

  • Removes the “About” block from Settings (safe inherit, priority=100).
  • Blanks the browser tab title fallback in web.layout (position="attributes").
  • It includes unit tests for both behaviors and passes pre-commit (prettier, ruff, pylint-odoo, OCA hooks).

Looking ahead, since there isn’t a module strictly for backend debranding, I think we can consolidate future backend debranding tweaks under this module to keep scope clear and avoid scattering small changes across the repo. Please review and let me know what do you think.

tishmen avatar Oct 15 '25 07:10 tishmen

Hello, please call it just web_debranding, for following the same pattern of the rest of the modules + remove redundant word odoo.

pedrobaeza avatar Oct 15 '25 09:10 pedrobaeza

@pedrobaeza The module has been renamed to web_debranding for consistency with the rest of the suite. Thanks!

tishmen avatar Oct 15 '25 17:10 tishmen

@tishmen alright great. thx for pointing to it. Just to make sure. in https://github.com/OCA/server-brand/pull/109 you do not render the o_brand_promotion meassage at all. in website_odoo_debranding we had some issues with enterprise planning installation (https://github.com/NICO-SOLUTIONS/server-brand/commit/24ae015ef88da95ba162f0c90b9450b3739322dd) I think checking this could make sense. And i think we should check if we do not multi-debrand stuff across modules.

Cheers Nils

NICO-SOLUTIONS avatar Nov 09 '25 20:11 NICO-SOLUTIONS