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
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    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 something in the up menu v7 ?

Abonare

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

Această întrebare a fost marcată
menuv7
1 Răspunde
4194 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
Imagine profil
Shawn Varghese
Cel mai bun răspuns

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
Imagine profil
Abandonează
Anabela Damas
Autor

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

Shawn Varghese

You are using version 7 right?

Anabela Damas
Autor

yes

Anabela Damas
Autor

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
Autor

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
Autor

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 ....

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
How to add a new menu
menu v7
Imagine profil
Imagine profil
Imagine profil
Imagine profil
3
dec. 21
9994
How work "action_id" and "menu_id" field of user configuration?
menu v7
Imagine profil
0
mar. 15
7279
Where is the menu of the lunch module?
lunch menu v7
Imagine profil
Imagine profil
2
mar. 15
6282
How to add a "Delete" button on the popup form? Rezolvat
v7
Imagine profil
Imagine profil
1
oct. 25
5453
Specific Menu Open in Settings or any Main Menu
developement settings menu v7
Imagine profil
Imagine profil
Imagine profil
2
apr. 25
6673
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