From 00194391e5f29aa975c2f97b44b141c2d641363a Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Thu, 24 Dec 2015 16:38:59 +0100 Subject: [PATCH] [IMP] base_export_manager: Several things (II): * Improve UX for base_export_manager. - Improve user instructions in README. - Require some required fields. - Allow to select models from a list. - Allow to select up to 3 fields from dynamic lists. - Improve translations. - More tests. - Translate column labels. Some methods have been renamed, so version tag is raised to 8.0.2.0.0. * Hardcode constraints in the `create` method instead of using normal ones. Depending on the context where the record is created, it gets `resource` or `model_id`. The problem is that Odoo checks constrains before inverses, so constrains would fail always. Test added to ensure future versions contemplate all use cases. * Allow to reorder fields. --- .../i18n/base_exports_manager.pot | 50 ------------------- base_export_manager/static/src/js/main.js | 26 +--------- base_export_manager/views/ir_exports_view.xml | 38 +++++++++++++- 3 files changed, 38 insertions(+), 76 deletions(-) delete mode 100644 base_export_manager/i18n/base_exports_manager.pot diff --git a/base_export_manager/i18n/base_exports_manager.pot b/base_export_manager/i18n/base_exports_manager.pot deleted file mode 100644 index 973fa80..0000000 --- a/base_export_manager/i18n/base_exports_manager.pot +++ /dev/null @@ -1,50 +0,0 @@ -# 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 "" diff --git a/base_export_manager/static/src/js/main.js b/base_export_manager/static/src/js/main.js index 4807681..43d04a5 100644 --- a/base_export_manager/static/src/js/main.js +++ b/base_export_manager/static/src/js/main.js @@ -1,27 +1,5 @@ -/** - * # -*- coding: utf-8 -*- - * ############################################################################## - * # - * # OpenERP, Open Source Management Solution - * # This module copyright : - * # (c) 2014 Antiun Ingenieria, SL (Madrid, Spain, http://www.antiun.com) - * # Antonio Espinosa - * # - * # 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 . - * # - * ############################################################################## - */ +/* © 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') } diff --git a/base_export_manager/views/ir_exports_view.xml b/base_export_manager/views/ir_exports_view.xml index a4f3741..a9b9b9a 100644 --- a/base_export_manager/views/ir_exports_view.xml +++ b/base_export_manager/views/ir_exports_view.xml @@ -1,4 +1,6 @@ + @@ -20,6 +22,7 @@ + @@ -32,14 +35,45 @@
+ - + + + + + - + + +