OCA Transbot
9 years ago
committed by
Jairo Llopis
5 changed files with 275 additions and 0 deletions
-
41base_export_manager/__openerp__.py
-
50base_export_manager/i18n/base_exports_manager.pot
-
79base_export_manager/static/description/icon.svg
-
54base_export_manager/static/src/js/main.js
-
51base_export_manager/views/ir_exports_view.xml
@ -0,0 +1,41 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
# Python source code encoding : https://www.python.org/dev/peps/pep-0263/ |
||||
|
############################################################################## |
||||
|
# |
||||
|
# OpenERP, Odoo Source Management Solution |
||||
|
# Copyright (c) 2015 Antiun Ingeniería S.L. (http://www.antiun.com) |
||||
|
# Antonio Espinosa <antonioea@antiun.com> |
||||
|
# |
||||
|
# This program is free software: you can redistribute it and/or modify |
||||
|
# it under the terms of the GNU Affero General Public License as published |
||||
|
# by the Free Software Foundation, either version 3 of the License, or |
||||
|
# (at your option) any later version. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU Affero General Public License for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU Affero General Public License |
||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
{ |
||||
|
'name': "Manages model export profiles", |
||||
|
'category': 'Personalization', |
||||
|
'version': '8.0.1.0.0', |
||||
|
'depends': [ |
||||
|
'web', |
||||
|
], |
||||
|
'data': [ |
||||
|
'views/assets.xml', |
||||
|
'views/ir_exports_view.xml', |
||||
|
], |
||||
|
'qweb': [ |
||||
|
"static/src/xml/base.xml", |
||||
|
], |
||||
|
'author': 'Antiun Ingeniería S.L.,Odoo Community Association (OCA)', |
||||
|
'website': 'http://www.antiun.com', |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
} |
@ -0,0 +1,50 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * base_exports_manager |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 8.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2015-10-27 12:38+0000\n" |
||||
|
"PO-Revision-Date: 2015-10-27 12:38+0000\n" |
||||
|
"Last-Translator: <>\n" |
||||
|
"Language-Team: \n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: \n" |
||||
|
|
||||
|
#. module: base_exports_manager |
||||
|
#: view:ir.exports:base_exports_manager.ir_exports_form_view |
||||
|
msgid "Export Profile" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_exports_manager |
||||
|
#: model:ir.actions.act_window,name:base_exports_manager.ir_exports_action |
||||
|
#: view:ir.exports:base_exports_manager.ir_exports_tree_view |
||||
|
#: model:ir.ui.menu,name:base_exports_manager.ir_exports_menu |
||||
|
msgid "Export Profiles" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_exports_manager |
||||
|
#: code:addons/base_exports_manager/models/ir_exports_line.py:62 |
||||
|
#, python-format |
||||
|
msgid "Field '%s' already exists" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_exports_manager |
||||
|
#: code:addons/base_exports_manager/models/ir_exports_line.py:57 |
||||
|
#, python-format |
||||
|
msgid "Field '%s' does not exist" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_exports_manager |
||||
|
#: field:ir.exports.line,sequence:0 |
||||
|
msgid "Sequence" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: base_exports_manager |
||||
|
#: field:ir.exports.line,label:0 |
||||
|
msgid "Label" |
||||
|
msgstr "" |
79
base_export_manager/static/description/icon.svg
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,54 @@ |
|||||
|
/** |
||||
|
* # -*- coding: utf-8 -*- |
||||
|
* ############################################################################## |
||||
|
* # |
||||
|
* # OpenERP, Open Source Management Solution |
||||
|
* # This module copyright : |
||||
|
* # (c) 2014 Antiun Ingenieria, SL (Madrid, Spain, http://www.antiun.com)
|
||||
|
* # Antonio Espinosa <antonioea@antiun.com> |
||||
|
* # |
||||
|
* # This program is free software: you can redistribute it and/or modify |
||||
|
* # it under the terms of the GNU Affero General Public License as |
||||
|
* # published by the Free Software Foundation, either version 3 of the |
||||
|
* # License, or (at your option) any later version. |
||||
|
* # |
||||
|
* # This program is distributed in the hope that it will be useful, |
||||
|
* # but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* # GNU Affero General Public License for more details. |
||||
|
* # |
||||
|
* # You should have received a copy of the GNU Affero General Public License |
||||
|
* # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
* # |
||||
|
* ############################################################################## |
||||
|
*/ |
||||
|
|
||||
|
// 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); |
@ -0,0 +1,51 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<openerp> |
||||
|
<data> |
||||
|
|
||||
|
<record id="ir_exports_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Export Profiles</field> |
||||
|
<field name="res_model">ir.exports</field> |
||||
|
<field name="view_type">form</field> |
||||
|
<field name="view_mode">tree,form</field> |
||||
|
</record> |
||||
|
|
||||
|
<menuitem id="ir_exports_menu" |
||||
|
parent="base.next_id_2" |
||||
|
name="Export Profiles" |
||||
|
action="ir_exports_action"/> |
||||
|
|
||||
|
<record id="ir_exports_tree_view" model="ir.ui.view"> |
||||
|
<field name="name">Export Profile tree</field> |
||||
|
<field name="model">ir.exports</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Export Profiles"> |
||||
|
<field name="name"/> |
||||
|
<field name="resource"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="ir_exports_form_view" model="ir.ui.view"> |
||||
|
<field name="name">Export Profile form</field> |
||||
|
<field name="model">ir.exports</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Export Profile"> |
||||
|
<group> |
||||
|
<field name="name"/> |
||||
|
<field name="resource"/> |
||||
|
</group> |
||||
|
<group> |
||||
|
<field name="export_fields" nolabel="1"> |
||||
|
<tree editable="bottom"> |
||||
|
<field name="label"/> |
||||
|
<field name="name"/> |
||||
|
<field name="sequence" invisible="1"/> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</group> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
</data> |
||||
|
</openerp> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue