[FIX] base_import: action button 'Import'

Adapt the template according to the refactoring of the parent commit.
This commit is contained in:
Aaron Bohy
2015-07-29 08:41:03 +02:00
parent 71e9de4ecc
commit a21fe28b8d
3 changed files with 6 additions and 10 deletions
+1 -4
View File
@@ -68,10 +68,7 @@
/* ----------- INITIAL SETUP ------------ */
.openerp .oe_list_buttons .oe_alternative {
visibility: visible;
}
.openerp .oe_list_buttons.oe_editing .oe_list_button_import {
.openerp .oe_list_buttons.oe_editing .o_list_button_import {
display: none;
}
+1 -1
View File
@@ -60,7 +60,7 @@ ListView.include({
}
this._super.apply(this, arguments); // Sets this.$buttons
if(add_button) {
this.$buttons.on('click', '.oe_list_button_import', function() {
this.$buttons.on('click', '.o_list_button_import', function() {
self.do_action({
type: 'ir.actions.client',
tag: 'import',
+4 -5
View File
@@ -398,11 +398,10 @@
<t t-if="error.moreinfo" t-raw="info(error.moreinfo)"/>
</t>
<t t-extend="ListView.buttons">
<t t-jquery="span.oe_alternative">
this.attr('t-if', 'widget.options.import_enabled');
</t>
<t t-jquery="span.oe_alternative" t-operation="append">
<a href="#" class="oe_bold oe_list_button_import">Import</a>
<t t-if='widget.options.import_enabled' t-jquery="button.o_list_button_add" t-operation="after">
<button type="button" class="btn btn-sm btn-default o_list_button_import">
Import
</button>
</t>
</t>
</templates>