Browse Source

[MIG][base_export_manager] Migrate features from 8.0

pull/22/head
Jairo Llopis 8 years ago
committed by Pedro M. Baeza
parent
commit
658ae4974b
  1. 7
      base_export_manager/README.rst
  2. 6
      base_export_manager/__manifest__.py
  3. 9
      base_export_manager/migrations/8.0.2.1.0/post-migrate.py
  4. 3
      base_export_manager/models/ir_exports_line.py
  5. 5
      base_export_manager/static/src/js/base_export_manager.js
  6. 3
      base_export_manager/tests/test_ir_exports_line.py

7
base_export_manager/README.rst

@ -44,6 +44,7 @@ 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 4 levels of
subfields.
* You can drag & drop to reorder the fields.
@ -86,10 +87,10 @@ Credits
Contributors
------------
* Antonio Espinosa <antonioea@antiun.com>
* Javier Iniesta <javieria@antiun.com>
* Rafael Blasco <rafabn@antiun.com>
* Jairo Llopis <yajo.sk8@gmail.com>
* Antonio Espinosa <antonio.espinosa@tecnativa.com>
* Rafael Blasco <rafael.blasco@tecnativa.com>
* Jairo Llopis <jairo.llopis@tecnativa.com>
* Dave Lasley <dave@laslabs.com>
* Sandip Mangukiya <smangukiya@ursainfosystems.com>
* Maxime Chambreuil <mchambreuil@ursainfosystems.com>

6
base_export_manager/__manifest__.py

@ -10,7 +10,6 @@
'web',
],
'data': [
'data/ir_exports_data.xml',
'views/assets.xml',
'views/ir_exports.xml',
'views/ir_model.xml',
@ -20,12 +19,11 @@
'qweb': [
"static/src/xml/base.xml",
],
'author': 'Antiun Ingeniería S.L., '
'Tecnativa, '
'author': 'Tecnativa, '
'LasLabs, '
'Ursa Information Systems, '
'Odoo Community Association (OCA)',
'website': 'http://www.antiun.com',
'website': 'https://www.tecnativa.com',
'license': 'AGPL-3',
'installable': True,
'application': False,

9
base_export_manager/migrations/8.0.2.1.0/post-migrate.py

@ -1,9 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.addons.base_export_manager import post_init_hook
def migrate(cr, version):
"""When updating, now you need the post_init_hook."""
post_init_hook(cr, None)

3
base_export_manager/models/ir_exports_line.py

@ -3,8 +3,7 @@
# Copyright 2015-2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api, exceptions
from odoo.tools.translate import _
from odoo import _, models, fields, api, exceptions
class IrExportsLine(models.Model):

5
base_export_manager/static/src/js/base_export_manager.js

@ -35,7 +35,10 @@ odoo.define('base_export_manager.base_export_manager', function(require) {
});
self.sidebar.items.other = items_data;
self.sidebar.add_items('other', _.compact([
self.render_export_enable >= 0 && {label: _t("Export"), callback: self.on_sidebar_export},
self.render_export_enable >= 0 && {
label: _t("Export"),
callback: self.on_sidebar_export
},
]));
}
});

3
base_export_manager/tests/test_ir_exports_line.py

@ -37,9 +37,8 @@ class TestIrExportsLineCase(TransactionCase):
m_ir_exports_line = self.env['ir.exports.line']
export_line = m_ir_exports_line.create({'name': 'parent_id/name',
'export_id': self.export.id})
check_label = " (res.partner) (parent_id/name)"
self.assertEqual(export_line.with_context(lang="en_US").label,
"Related Company (res.partner)/Name" + check_label)
"Related Company/Name (parent_id/name)")
with self.assertRaises(ValidationError):
m_ir_exports_line.create({'name': '',
'export_id': self.export.id})

Loading…
Cancel
Save