Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
895 มุมมอง

I am sure that someone here has the answer to my quest: 

I am creating an importable module, which is going well, but now I want to add a menu icon and I do not succeed at all.

The menu xml contains:

<menuitem .... web_icon="my_module_name,static/description/icon.png">...</menuitem>

What works

  1. The menu works correctly with all actions etc. 
  2. The web icon 'path' appears correctly in the menu settings once imported. 
  3. My .zip file contains a file: static/description/icon.png.
  4. If I search the module in the apps list - after importing it -, it shows the correct icon.

What does not work

  1. On the 'home' page of Odoo, the icon is the ugly (V16?) empty box with exclamation mark. 
  2. If I open the html (F12) and modify the path of the <img src=""/> form "/web/static/img/default_icon_app.png" to "/my_module_name/static/description/icon.png" the correct icon appears.

It appears as if the image is correctly imported, but somehow the path is not resolved correctly and as a consequence the 'default icon' is loaded.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
menu item odoo แก้ไขแล้ว
1
ต.ค. 16
3799
Creating a new Menu item แก้ไขแล้ว
4
ธ.ค. 21
12449
0
มี.ค. 19
6821
ir.actions.server SAVE BUTTON MISSING? แก้ไขแล้ว
1
ก.ค. 16
5693
1
เม.ย. 15
3141