Skip to content
Snippets Groups Projects
Commit a9905518 authored by Romain Derie's avatar Romain Derie
Browse files

[FIX] base: prevent "learn more" to be shown when no website/link

Apps have a "learn more" button which is redirecting to the given
website/URL.
The website is a field of the `ir.module.module` record, typically set
on enteprise apps in this file [1].

But the apps without a website are incorrectly showing that button.
Clicking on it will redirect the user to a `/false` 404 page, except in
16.0 and later version where it will simply do nothing.

Seems like there was an error introduced at some point, I didn't dig
into a complete history check but [2] could be a start.

[1]: https://github.com/odoo/odoo/blame/11d023f068d0308f2fa2de45f932f61a95086c6b/odoo/addons/base/data/ir_module_module.xml#L16
[2]: https://github.com/odoo/odoo/commit/7f9e7f0c961106fe13419166f112007f2d04e6ac#diff-c6e4af323e7ca3fe9d069fa98cd5da2f18ba606b8e4262005a79d2c1e0890dc8R189



closes odoo/odoo#106702

Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
parent c684ccd0
No related branches found
No related tags found
No related merge requests found
......@@ -194,7 +194,7 @@
<code groups="base.group_no_one"><field name="name"/></code>
</p>
<div class="oe_module_action">
<a t-att-href="record.website.raw_value" target="_blank" attrs="{'invisible':[('website', '=', '')]}" class="btn btn-sm btn-secondary float-right o-hidden-ios" role="button">Learn More</a>
<a t-att-href="record.website.raw_value" target="_blank" attrs="{'invisible':[('website', 'in', (False, ''))]}" class="btn btn-sm btn-secondary float-right o-hidden-ios" role="button">Learn More</a>
<a type="edit" class="btn btn-secondary btn-sm float-right" role="button" attrs="{'invisible': [('website', '&lt;&gt;', '')]}">Module Info</a>
<button type="object" class="btn btn-primary btn-sm" name="button_immediate_install" states="uninstalled" t-if="! record.to_buy.raw_value">Install</button>
<a href="https://odoo.com/pricing?utm_source=db&amp;utm_medium=module#hosting=on_premise" class="btn btn-info btn-sm" states="uninstalled,uninstallable" t-if="record.to_buy.raw_value" role="button">Upgrade</a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment