Browse Source

base_export_manager: Upgrade to v9 * Upgrade base_export_manager to v9 * Rename JS to base_export_manager

pull/22/head
Dave Lasley 9 years ago
committed by Pedro M. Baeza
parent
commit
bd4f67db0a
  1. 3
      base_export_manager/README.rst
  2. 2
      base_export_manager/__openerp__.py
  3. 79
      base_export_manager/static/description/icon.svg
  4. 32
      base_export_manager/static/src/js/main.js
  5. 7
      base_export_manager/views/ir_exports_view.xml

3
base_export_manager/README.rst

@ -44,7 +44,8 @@ To manage export profiles, you need to:
* Choose a name.
* Choose a model (table in the database).
* Choose the fields to export.
* If you choose a related field, you can choose also up to 3 levels of subfields.
* If you choose a related field, you can choose also up to 3 levels of
subfields.
* You can drag & drop to reorder the fields.
To use one of those profiles, you need to:

2
base_export_manager/__openerp__.py

@ -5,7 +5,7 @@
{
'name': "Manage model export profiles",
'category': 'Personalization',
'version': '9.0.1.1.0',
'version': '9.0.1.0.0',
'depends': [
'web',
],

79
base_export_manager/static/description/icon.svg
File diff suppressed because it is too large
View File

32
base_export_manager/static/src/js/main.js

@ -1,32 +0,0 @@
/* © 2015 Antiun Ingeniería S.L. - Antonio Espinosa
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). */
// Check jQuery available
if (typeof jQuery === 'undefined') { throw new Error('Requires jQuery') }
+function ($) {
'use strict';
openerp.base_exports_manager = function(instance, local) {
var _t = instance.web._t,
_lt = instance.web._lt;
var QWeb = instance.web.qweb;
instance.web.DataExport.include({
do_load_export_field: function(field_list) {
var export_node = this.$el.find("#fields_list");
_(field_list).each(function (field) {
export_node.append(new Option(field.label + ' (' + field.name + ')', field.name));
});
},
add_field: function(field_id, string) {
var field_list = this.$el.find('#fields_list');
if (this.$el.find("#fields_list option[value='" + field_id + "']")
&& !this.$el.find("#fields_list option[value='" + field_id + "']").length) {
field_list.append(new Option(string + ' (' + field_id + ')', field_id));
}
},
});
}
}(jQuery);

7
base_export_manager/views/ir_exports_view.xml

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<openerp>
<data>
<odoo>
<record id="ir_exports_action" model="ir.actions.act_window">
<field name="name">Export Profiles</field>
@ -81,5 +81,4 @@
</field>
</record>
</data>
</openerp>
</odoo>
Loading…
Cancel
Save