[IMP] If any attachment on a record, display 'X Attachment(s)' in sidebar
bzr revid: fme@openerp.com-20120828144613-6a47a4o5iwqb8t0o
This commit is contained in:
parent
67ea7a40a4
commit
03383c7408
|
@ -874,7 +874,7 @@ instance.web.Sidebar = instance.web.Widget.extend({
|
|||
var view = this.getParent();
|
||||
this.sections = [
|
||||
{ 'name' : 'print', 'label' : _t('Print'), },
|
||||
{ 'name' : 'files', 'label' : _t('Attachment'), },
|
||||
{ 'name' : 'files', 'label' : _t('Attachment(s)'), },
|
||||
{ 'name' : 'other', 'label' : _t('More'), }
|
||||
];
|
||||
this.items = {
|
||||
|
|
|
@ -540,6 +540,7 @@
|
|||
<t t-foreach="widget.sections" t-as="section">
|
||||
<div class="oe_form_dropdown_section">
|
||||
<button class="oe_dropdown_toggle oe_dropdown_arrow">
|
||||
<t t-if="section.name == 'files'" t-raw="widget.items[section.name].length || ''"/>
|
||||
<t t-esc="section.label"/>
|
||||
</button>
|
||||
<ul class="oe_dropdown_menu">
|
||||
|
|
Loading…
Reference in New Issue