Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4940 Widoki

Hi everybody,

I'm creating a custom addon module customizing the theme of Odoo.
I'm trying to customize Odoo icons for all standard addons, even if they are not installed.

I try to customize, for example, the calendar icon:

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="calendar.mail_menu_calendar" model="ir.ui.menu">
<field name="web_icon">my_theme,static/icons/calendar.png</field>
<field name="name">Calendar</field>
</record>
</data>
</odoo>

When I launch odoo, it gives me the following error:

2019-12-27 13:28:21,079 48627 ERROR odoo werkzeug: Error on request:
...
File "/Users/user/odoo/odoo/tools/convert.py", line 255, in _test_xml_id
assert modcnt == 1, """The ID "%s" refers to an uninstalled module""" % (xml_id,)
odoo.tools.convert.ParseError: "The ID "calendar.mail_menu_calendar" refers to an uninstalled module" while parsing /Users/user/custom-addons/my_theme/views/icons.xml:9, near
<record id="calendar.mail_menu_calendar" model="ir.ui.menu">
<field name="web_icon">my_theme,static/icons/calendar.png</field>
<field name="name">Calendar</field>
</record>

How can i add customized icons even if a module is not (yet) installed?

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

You cannot do it like this, in the manifest file of the module you have to specify on which all modules the newly creating module is depends on. As you are making changes inside the calendar module, you have to specify it in the manifest. 

And if you need to install your custom module automatically once the calendar module is installed, you can set auto_install = True in manifest, so once the calendar is installed your custom module will also get installed. 

Thanks

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
maj 23
3326
1
gru 22
3445
0
sie 21
3563
4
paź 20
11465
1
cze 20
4670