Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
4 Ответы
3493 Представления

I need to add a custom font to the Odoo website editor, so I followed this tutorial:

cybrosys . com / blog / how-to-add-custom-fonts-in-odoo-16

I created the custom module, but when I started my local Odoo server (nginx) the navigator interface showed me this error in the upper right corner:

'Connection lost. Trying to reconnect...'

I can't access the Odoo interface unless I remove the custom font module...

The server console showed me this error several times:

odoo        |   File "", line 1
odoo        |     'assets': {
odoo        |             ^
odoo        | SyntaxError: invalid syntax

I tried creating other custom modules in the same folder and they worked just fine (as long as I removed the custom font module in question)

I really appreciate any help you can provide :^}

I uploaded my module to this repository: 

github . com / ezert / glacial_indifference_font

Odoo version: 17


Note: I don't have enough karma to post images and links. You can find a clone of this Question in Stack Overflow: 

stackoverflow . com / questions / 77567977 / odoo-adding-font-module




Аватар
Отменить
Автор

Jort de Vreeze & Cybrosis: thank you for the help.

I could add the module without any connection issues.
But a new problem appeared: the module simply didn't work.
I upgraded the app list and installed the module, but the font
won't show in the Website editor yet...
What am I doing wrong?
I updated the module repository with the new alterations.

Thank you again!
(I can't answer people, because I don't have karma... I hope you see it someway)

Лучший ответ

bnjr, can you help me please, I have 3 .woff files of fonts that I want to integrate into odoo 16, I want these fonts which appear here, website

Аватар
Отменить
Автор Лучший ответ

Jort de Vreeze & Cybrosis: thank you for the help.

I could add the module without any connection issues.
But a new problem appeared: the module simply didn't work.
I upgraded the app list and installed the module, but the font
won't show in the Website editor yet...
What am I doing wrong?
I updated the module repository with the new alterations.

Thank you again!
(I can't answer people, because I don't have karma... I hope you see it someway)


Аватар
Отменить

Hello Ezert,

In case you didn't find any answer, i was on this issue for hours now and finally found the solution, follow this guide (https://jortdevreeze.com/blog/odoo-2/adding-locally-hosted-custom-fonts-in-odoo-18) but instead of extending the SCSS variable $o-theme-font-configs use the variable $o-base-theme-font-configs

Лучший ответ

Your manifest file is missing the required name​ field (see https://www.odoo.com/documentation/17.0/developer/reference/backend/module.html). So if you would update your manifest like this:

{
    'name': "Your Module",
    'assets': {
        'web._assets_primary_variables': [
            "glacial_indifference_font/static/src/scss/map-merge.scss"
        ]
    },
}

I hope this helps!

Аватар
Отменить
Лучший ответ

Hi,

Try giving the other keys in manifest, like name, version etc. You can refer to the manifest of any modules from the addons in odoo 17 and follow that.

Hope it helps

Аватар
Отменить
Related Posts Ответы Просмотры Активность
4
мая 24
1617
Website Issue Решено
1
апр. 24
2098
0
авг. 24
1967
3
февр. 25
3282
0
июн. 23
1745