Browse Source

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.
pull/870/head
Jairo Llopis 9 years ago
parent
commit
5df8e1f97d
  1. 27
      base_export_manager/__openerp__.py
  2. 50
      base_export_manager/i18n/base_exports_manager.pot
  3. 26
      base_export_manager/static/src/js/main.js
  4. 32
      base_export_manager/views/ir_exports_view.xml

27
base_export_manager/__openerp__.py

@ -1,33 +1,16 @@
# -*- 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/>.
#
##############################################################################
# © 2015 Antiun Ingeniería S.L. - Antonio Espinosa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': "Manages model export profiles",
'category': 'Personalization',
'version': '8.0.1.0.0',
'version': '8.0.2.0.0',
'depends': [
'web',
],
'data': [
'data/ir_exports_data.xml',
'views/assets.xml',
'views/ir_exports_view.xml',
],

50
base_export_manager/i18n/base_exports_manager.pot

@ -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 ""

26
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 <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/>.
* #
* ##############################################################################
*/
/* © 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') }

32
base_export_manager/views/ir_exports_view.xml

@ -20,6 +20,7 @@
<field name="arch" type="xml">
<tree string="Export Profiles">
<field name="name"/>
<field name="model_id"/>
<field name="resource"/>
</tree>
</field>
@ -32,14 +33,43 @@
<form string="Export Profile">
<group>
<field name="name"/>
<field name="model_id"
options="{'no_create': True}"/>
<field name="resource"/>
</group>
<group>
<field name="export_fields" nolabel="1">
<tree editable="bottom">
<field name="sequence" invisible="True"/>
<field name="model1_id" invisible="True"/>
<field name="model2_id" invisible="True"/>
<field name="model3_id" invisible="True"/>
<field name="label"/>
<field name="name"/>
<field name="sequence" invisible="1"/>
<field
name="field1_id"
options="{
'no_open': True,
'no_create': True,
}"/>
<field
name="field2_id"
attrs="{
'readonly': [('model2_id', '=', False)],
}"
options="{
'no_open': True,
'no_create': True,
}"/>
<field
name="field3_id"
attrs="{
'readonly': [('model3_id', '=', False)],
}"
options="{
'no_open': True,
'no_create': True,
}"/>
</tree>
</field>
</group>

Loading…
Cancel
Save