Skip to Content
Menu
This question has been flagged
1 Reply
2384 Views

Hi guys,

Where can i find the script which is counting emails, I would like to change it to show exact figures instead of a 99+.

If anyone know where to find it please ?


Avatar
Discard
Best Answer

You need to change this qweb client template:

<t t-name="Menu.needaction_counter">
<div id="menu_counter" class="badge pull-right">
<t t-if="widget.needaction_counter &gt; 99"> 99+ </t>
<t t-if="widget.needaction_counter &lt;= 99"> <t t-esc="widget.needaction_counter"/> </t>
</div>
</t>

to this in a new file like templates.xml:

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">

<t t-name="Menu.needaction_counter">
<div id="menu_counter" class="badge pull-right"> 
<t t-esc="widget.needaction_counter"/>
</div>
</t>

</templates>

to be loaded in __openerp__.py in the qweb key of the dict:

    'qweb' : [
'static/src/xml/templates.xml'
],
Avatar
Discard
Author

Weird, it works on one machine and it won't on another ? Anyway, thank you Axel. Works beautifully :)

The machine where didn't work may need some page reload to update the new template extension loaded when the page get loaded. Happy to help you

Author

Yes Axel, apparently that's the problem. I'll find out what needs to be reloaded :) Thank you

Author

One more thing I would like to change, timeout, it should refresh either after each action or after certain period of time.Do you have any ideas where can i change it ?

No, I have no clue