Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Guest House
    • Distributeur de boissons
    • Hotel
    Real Estate
    • Real Estate Agency
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consulting
    • Accounting Firm
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Solar Energy Systems
    • Cordonnier
    • Services de nettoyage
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

How to put something in the up menu v7 ?

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
menuv7
1 Répondre
4192 Vues
Avatar
Anabela Damas

Hello, 

I wanted to put something near the name of the user in the upper menu, rigtth coner.

I try to do this :  http://lolierp.blogspot.pt/2014/11/odoo-8-heritage-de-javascript-ex.html

But nothing happend, I don't know if it is the version... 

Then I made some changes in __openerp__.py:

I tryed like this :

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

than like this:

'data': [],
'js': ["static/src/js/mydisplaydb.js"],
'qweb' : [],

And I change the the mydisplaydb.xml, because I was getting an error:

<template id="assets_backend" name="change_bar" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/vi_change_bar/static/src/js/mydisplaydb.js"></script>
</xpath>
</template>

 

Still nothing. 

I wanted to put there a float returned by a function, for the user to know is balance.

I'm not familiar to JS. 

0
Avatar
Ignorer
Avatar
Shawn Varghese
Meilleure réponse

If you are using OpenERP version 7, try this way of including JS files.

In the _openerp_.py part in the link, look for this part:

'data': ['mydisplaydb.xml'],
'js': [],

Put the name of the js file here (mydisplaydb.js), and replace the xml file call for data so it should look like this:

'data': [],
'js': [mydisplaydb.js],

So basically, instead of using the XML file and calling the JS file from there, you can directly link it in the _openerp_.py manifest file.

I used to use this method to call JS files in OpenERP 7. Also, can you give an idea of what you are looking to put in the top right corner? We can explain what is necessary in the JS file more clearly.

Let me know if you need more help with this.

Edit:

Ok. Now, remove the xml file completely. In version 7, you do not require the XML for JS. Only keep your JS file and write only the following in your JS file. Your __openerp___.py manifest file must only keep the JS file as a dependency, there should be not xml mentioned in it.

openerp.mydisplaydb = function (instance)

{

instance.web.UserMenu.include(
    {
        do_update: function ()
        {
            this._super();
            alert("hello");
        }
    });

}

Do not keep anything else in your JS file. Refresh your browser and see if you can get an alert. Please note, in the first line, openerp.mydisplaydb, the name must exactly match the name of your module.

If this doesn't work, we'll go step by step and start over.

 

0
Avatar
Ignorer
Anabela Damas
Auteur

I'm going to change my question to put code, it stays better. =)

Shawn Varghese

You are using version 7 right?

Anabela Damas
Auteur

yes

Anabela Damas
Auteur

Thanksssss a LOT. The problem was " Please note, in the first line, openerp.mydisplaydb, the name must exactly match the name of your module." . Wish me luck to put there my float value , I already have the "hello" =) . Do you know how to put something (a word) in the letf of the envelope ?

Anabela Damas
Auteur

Thanks!! I write the value like this : this.get_value_balance(self.session.uid, function(res) { el_html.text(_.str.sprintf("Saldo: %s", res)); });

Anabela Damas
Auteur

Hi, now I'm trying to do the same in v8, do you know what are the changes? I made the same test with the alert(); and it's not call ....

Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
How to add a new menu
menu v7
Avatar
Avatar
Avatar
Avatar
3
déc. 21
9991
How work "action_id" and "menu_id" field of user configuration?
menu v7
Avatar
0
mars 15
7276
Where is the menu of the lunch module?
lunch menu v7
Avatar
Avatar
2
mars 15
6282
How to add a "Delete" button on the popup form? Résolu
v7
Avatar
Avatar
1
oct. 25
5451
Specific Menu Open in Settings or any Main Menu
developement settings menu v7
Avatar
Avatar
Avatar
2
avr. 25
6672
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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