OCA / server-tools

Tools for Odoo Administrators to improve some technical features on Odoo.
https://odoo-community.org/psc-teams/tools-30
GNU Affero General Public License v3.0
705 stars 1.5k forks source link

[16.0] Can't use base_fontawesome, not showing icons #2694

Open iggups opened 1 year ago

iggups commented 1 year ago

Module

base_fontawesome

Describe the bug

Tried to use the new icons in an XML view but I don't see any icon at all. Maybe I am using it wrong? I followed the documentation.

To Reproduce

Affected versions: 16.0.5.15.4

Steps to reproduce the behavior:

  1. Install module
  2. Add <button brand_icon="fa-amazon-pay" string=" fa-amazon-pay"/> to a form view
  3. Only string is shown, no icon

Expected behavior Icon is shown

danielduqma commented 1 year ago

Found similar bug, an easy way to reproduce is installing just base_fontawesome and website on a clean installation, for example on runboat. Tested on linked runboat and right after installation icons of social networks on footer are broken:

image

Looks like not all assets are loaded:

image

Could anyone take a look of this please @OCA/tools-maintainers?

Best regards.

thomaspaulb commented 1 year ago

It seems to be something amiss in web.assets_frontend.

When inspecting /web/assets/debug/1/web.assets_frontend.css on Runboat, fontawesome.css is included, but all.css isn't, and I think that's the one needed for the correct interpretation of the fa-* classes. In the backend, it does work.

danielduqma commented 1 year ago

Solved in https://github.com/OCA/server-tools/pull/2740, could someone take a look please? Thanks!

iggups commented 10 months ago

Hi folks, I am still not seeing the icons in the odoo backend. I am using them as described in the OP.

I updated the module to 16.0.5.16.0 and wanted to use the new icons in a form view button like:

<button class="oe_stat_button" type="object" name="action_foobar" brand_icon="fa-amazon-pay">
   <field name="foobar_count" widget="statinfo" string="Foo Bar"/>
</button>
thomaspaulb commented 9 months ago

@iggups I think it is now fixed

iggups commented 1 month ago

@thomaspaulb Unfortunately not.

This is my code:

<button class="oe_stat_button" type="object" name="action_external_contract"
                                brand_icon="fa-amazon-pay"
                        >
                            <field name="external_contract_count" widget="statinfo" string="External Contracts"/>
</button>

And this is how it looks Screenshot_20241015_082143

I have the latest version intalled.