[19.0][MIG] portal_debranding: migrate
Scope
- portal_debranding
Depends on
- None
Summary
- Migrate to Odoo 19 and rename the module to
portal_debrandingto remove redundant wording. - Debrand portal pages:
- Hide brand promotion block.
- Remove/avoid "Powered by Odoo" in portal record sidebar and login page footer.
- No new dependencies.
Pre-commit
- Ran locally; hooks passed (prettier, ruff, pylint-odoo, OCA hooks).
Tests
- Unit tests included to assert brand promotion is hidden and portal sidebar has no "Powered by".
- Example run:
./odoo/odoo-bin -c odoo.conf -d <db> -i portal_debranding --test-enable --stop-after-init
Review notes
- Renaming applied as suggested (V-Name), keeping the technical scope minimal and focused on portal debranding.
/ocabot migration portal_odoo_debranding
Checked on runboat that indeed there's no "Powered by Odoo" in the /my page, but we have it on the login screen:
and I think this module should also take care of that. It's not a migration thing, as previous versions already had it, but to improve it that way. What do you think?
Thanks, @pedrobaeza - I’ll definitely take care of that and remove the “Powered by Odoo” footer.
If you notice any other Odoo-related branding that should be stripped out, please let me know and I’ll handle those too. I think this module should cover a bit more ground - I can already think of the website onboarding page and the “Powered by Odoo” strings at the bottom of the initial settings screen. What do you think?
Also, I’ve noticed that Odoo alert modals sometimes include “Odoo” in their titles. I’ve seen some third-party modules handle that kind of debranding as well - do you think that’s something we could leverage here?
There's already a module for the website: https://github.com/OCA/website/tree/18.0/website_odoo_debranding
It should be maybe hosted here, but it's for now on OCA/website, and the idea is to not make this current module to depend on other modules that may or may not be installed.
I’ll try to migrate that module to version 19 as well so we can have a complete rebranding suite.
By the way, what about the Odoo branding shown at the bottom of the Settings page under Developer Tools? Should we handle that here too, or would you prefer it to stay out of scope?
Well, the idea of this module is to prevent an outsider to see the brand Odoo. If you have access to the settings, you probably know that you are using Odoo, hehe.
Got it 🙂 I’ll try to make the module cover as much of the debranding as possible while keeping things clean. Once it’s done, we can review together and decide which parts make sense to keep or remove.
Hi @pedrobaeza!
- I’ve added the debranding for the login screen so “Powered by Odoo” no longer shows up there.
- I also added tests covering both the login page debranding and the portal record sidebar (no “Powered by” there either).
- In parallel, I built a new module, web_odoo_debrand, which removes Odoo traces from Settings (About block) and clears the browser tab title fallback. It includes unit tests, and I’ll open a PR for it shortly.
If you spot any other remaining Odoo branding, happy to include it as well.
Thanks for the changes. Another good change is to rename the module to portal_debranding to remove redundant words, but I would understand if it's asking too much.
Thanks for the renaming. For having the whole commit history renamed, as if not, the commit history will be lost on next version, please do:
https://github.com/OCA/brand/pull/274#issuecomment-3406563837
Hi @pedrobaeza , I rewrote the entire branch history to preserve ancestry using:
- git filter-repo --path-rename portal_odoo_debranding/:portal_debranding/ --refs 19.0-mig-portal_odoo_debranding --force
Force-pushed the branch; PR #109 is updated. I also adjusted the title to “Portal” and renamed the tests accordingly. For anyone with the branch checked out:
- git fetch origin && git checkout 19.0-mig-portal_odoo_debranding && git reset --hard origin/19.0-mig-portal_odoo_debranding
BTW, it’s been great aligning and merging all the debranding modules into a coherent suite. Really appreciate your guidance throughout! @pedrobaeza
@tishmen @pedrobaeza : something else that might be included in the portal debranding code. Not sure how long this already exists in Odoo honestly, but it is full of "Odoo" references. With the E-Invoicing modules being more frequently used, this modal can be opened in the /my/purchase and /my/orders screen. Dependency on edi_ubl modules before the button starts showing. See below screenshot and source code of the modal.
(sale/views/sale_portal_templates.xml)
<div class="modal fade" id="sale_portal_connect_software_modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-body">
<div>
<h5>Want to import this document in Odoo?</h5>
<p>Drag and drop the request for quotation PDF file into your list of quotations in Odoo. Enjoy the automation!</p>
</div>
<div>
<h5>Not using Odoo?</h5>
<div class="input-group mb-3 w-50">
<t t-set="base_address" t-value="sale_order.env['ir.config_parameter'].sudo().get_param('web.base.url')"/>
<t t-set="doc_url" t-value="base_address + '/my/orders/' + str(sale_order.id) + '/download_edi?' + str(keep_query())"/>
<input type="text" class="form-control" aria-describedby="copy-button" readonly="readonly" t-att-value="doc_url"/>
<button class="btn btn-outline-secondary" type="button" id="copy-button"
t-attf-onclick="navigator.clipboard.writeText('#{doc_url}')">Copy</button>
</div>
<p>Use the above REST URL to get structured data of the purchase order in UBL format.
<a href="https://www.odoo.com/documentation/">Read the documentation </a>to learn all the ways to connect your software with <a href="https://www.odoo.com">Odoo</a>.
</p>
</div>
<div>
<h5>You don't use a good CRM software?</h5>
<p><a href="https://www.odoo.com/app/sales">Start on Odoo</a>, it's 100% free! You'll save time creating beautiful quotations and track sales.</p>
</div>
</div>
<div class="modal-footer justify-content-between">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
@bjornbillen that requires an extra glue module sale_portal_debranding or similar, as we can't depend this one on sale. Feel free to propose it.
For now, let's merge this one.
/ocabot merge nobump
What a great day to merge this nice PR. Let's do it! Prepared branch 19.0-ocabot-merge-pr-109-by-pedrobaeza-bump-nobump, awaiting test results.
@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 19.0-ocabot-merge-pr-109-by-pedrobaeza-bump-nobump.
After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.
@tishmen please rebase and check the new XML structure.
@pedrobaeza : totally understandable. I'll see what I can do, but currently no time left for developing new features. Can I/you create a new issue for this in this repository, so maybe someone else can figure this out?
Go ahead creating the issue, yes.