Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

How to put a menu Icon in odoo 9?

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
hrattendancemenuiconodoo9
3 Antwoorden
12490 Weergaven
Avatar
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
Avatar
Annuleer
Avatar
Baintex Technologies S.L.
Auteur Beste antwoord

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
Avatar
Annuleer
Avatar
Jérôme Thériault
Beste antwoord

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
Avatar
Annuleer
Avatar
Giezel Esteves
Beste antwoord

just add your icon.png inside your description folder

module_name/static/description/icon.png

restart odoo-server

0
Avatar
Annuleer
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
Biometric Integration on HR Attendance.
hr attendance biometric odoo9
Avatar
Avatar
Avatar
Avatar
7
mrt. 20
12571
Connect fingerprint devices to Odoo Opgelost
hr attendance
Avatar
Avatar
1
mei 25
2101
Allow employees to see their own attendances Opgelost
hr attendance
Avatar
Avatar
Avatar
Avatar
Avatar
6
jan. 23
18390
odoo13: Button with function of capture image Opgelost
hr attendance
Avatar
Avatar
2
dec. 22
5776
attendance link not coming on the above header
hr attendance
Avatar
0
dec. 17
4417
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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