Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I wanted to put something near the name of the user in the upper menu, rigtth coner.
But nothing happend, I don't know if it is the version...
Then I made some changes in __openerp__.py:
I tryed like this :
'qweb' : ["static/src/xml/mydisplaydb.xml"],
than like this:
'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">
I wanted to put there a float returned by a function, for the user to know is balance.
I'm not familiar to JS.
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:
Put the name of the js file here (mydisplaydb.js), and replace the xml file call for data so it should look like this:
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.
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)
do_update: function ()
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.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 2/18/15, 2:09 PM|
|Seen: 596 times|
|Last updated: 3/16/15, 8:10 AM|