Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

How to put a menu Icon in odoo 9?

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
hrattendancemenuiconodoo9
3 Răspunsuri
12488 Vizualizări
Imagine profil
Baintex Technologies S.L.

I want to put a menu icon for the hr_attendance addon.

I will explain the steps that i have done:

1. Create hr_attendance_extend an put it in addon_extra

2. Import the original addon. This is "__init__.py:

import hr_attendance


3. Create the css and put the icon. This is a piece of the file "static/src/css/slider.css":

...

.oe_systray .oe_attendance_signout {

float:right;

height: 32px;

width: 32px;

background: url(/hr_attendance_extend/static/src/img/emp-in32.png);

cursor: pointer;

}

...


4. Link the file with the addon. This is the file ''views/hr_attendance.xml":

<?xml version="1.0" encoding="utf-8"?>

<openerp>

<data>

<template id="assets_backend" name="hr_attendance assets" inherit_id="web.assets_backend">

<xpath expr="." position="inside">

  <link rel="stylesheet" href="/hr_attendance_extend/static/src/css/slider.css"/>

</xpath>

</template>

</data>

</openerp>


5. Put the new files in the new addon. This is part of the file "__openerp__.py":

{

...

'depends': ['hr_attendance'],

'data': [

'hr_attendance.xml',

'views/hr_attendance.xml',

],

'demo': [],

'test': [],

'installable': True,

'auto_install': False,

#web 

'qweb' : ["static/src/xml/attendance.xml"],

}


6. Put the container for the menu. This is the file ''static/src/xml/attendance.xml":

<template>

<t t-name="AttendanceSlider">

<li class="oe_attendance_status oe_attendance_nosigned" data-toggle="tooltip">

  <div class="oe_attendance_signout"></div>

</li>

</t>

</template>


In the original addon (hr_attendance) there is a function that it pushes the icon to the menu (I think). 

There is in the file static/src/js/attendance.js and that is the line in question:

SystrayMenu.Items.push(AttendanceSlider);

That's all.

I don't know if I am missing something.  The code of the icon appears in the html, but there is with 'style="display: none"'

1
Imagine profil
Abandonează
Imagine profil
Baintex Technologies S.L.
Autor Cel mai bun răspuns

Giezel Esteves, thanks for the interest, but that doesn't fix anything.

I have an icon.png in the folder.


Nevertheless, I realized what was wrong.

The problem is that my current user is not an employee, and that's the reason of the "style=display: none;"
I assigned an employee to the user and now the icon appears.

1
Imagine profil
Abandonează
Imagine profil
Jérôme Thériault
Cel mai bun răspuns

Since this shows up first in Google, I thought I'd add this answer.

Let's say you want to use your module icon as your main menu icon.

  1. Make sure this file exists: module_name/static/description/icon.png

  2. In the XML where you define your main menu, add the web_icon attribute:

    <menuitem name="My App" id="module_name.menu_root" web_icon="module_name,static/description/icon.png"/>
  3. Upgrade your module

0
Imagine profil
Abandonează
Imagine profil
Giezel Esteves
Cel mai bun răspuns

just add your icon.png inside your description folder

module_name/static/description/icon.png

restart odoo-server

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Biometric Integration on HR Attendance.
hr attendance biometric odoo9
Imagine profil
Imagine profil
Imagine profil
Imagine profil
7
mar. 20
12571
Connect fingerprint devices to Odoo Rezolvat
hr attendance
Imagine profil
Imagine profil
1
mai 25
2101
Allow employees to see their own attendances Rezolvat
hr attendance
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
6
ian. 23
18390
odoo13: Button with function of capture image Rezolvat
hr attendance
Imagine profil
Imagine profil
2
dec. 22
5776
attendance link not coming on the above header
hr attendance
Imagine profil
0
dec. 17
4417
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now