From b460abc5121ac83f3c706baf6290e66ea097bd33 Mon Sep 17 00:00:00 2001 From: mreficent Date: Fri, 16 Jun 2017 18:01:21 +0200 Subject: [PATCH] [MIG] account_partner_reconcile: Migration to 10.0 --- account_partner_reconcile/README.rst | 2 +- .../{__openerp__.py => __manifest__.py} | 2 +- .../models/res_partner.py | 2 +- account_partner_reconcile/tests/__init__.py | 6 +++ .../tests/test_account_partner_reconcile.py | 38 +++++++++++++++++++ .../views/res_partner_view.xml | 34 ++++++++--------- 6 files changed, 64 insertions(+), 20 deletions(-) rename account_partner_reconcile/{__openerp__.py => __manifest__.py} (94%) create mode 100644 account_partner_reconcile/tests/__init__.py create mode 100644 account_partner_reconcile/tests/test_account_partner_reconcile.py diff --git a/account_partner_reconcile/README.rst b/account_partner_reconcile/README.rst index b0a8842c..c073f784 100644 --- a/account_partner_reconcile/README.rst +++ b/account_partner_reconcile/README.rst @@ -17,7 +17,7 @@ The button is visible only to users that belong to the accounting groups .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/96/9.0 + :target: https://runbot.odoo-community.org/runbot/96/10.0 Bug Tracker =========== diff --git a/account_partner_reconcile/__openerp__.py b/account_partner_reconcile/__manifest__.py similarity index 94% rename from account_partner_reconcile/__openerp__.py rename to account_partner_reconcile/__manifest__.py index 7517dd13..b542616b 100644 --- a/account_partner_reconcile/__openerp__.py +++ b/account_partner_reconcile/__manifest__.py @@ -5,7 +5,7 @@ { 'name': "Account Partner Reconcile", - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', 'category': 'Accounting', 'author': 'Eficent,' 'Odoo Community Association (OCA), ', diff --git a/account_partner_reconcile/models/res_partner.py b/account_partner_reconcile/models/res_partner.py index b6c413b4..b279dfc2 100644 --- a/account_partner_reconcile/models/res_partner.py +++ b/account_partner_reconcile/models/res_partner.py @@ -3,7 +3,7 @@ # (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from openerp import models, api +from odoo import api, models class ResPartner(models.Model): diff --git a/account_partner_reconcile/tests/__init__.py b/account_partner_reconcile/tests/__init__.py new file mode 100644 index 00000000..16bbafad --- /dev/null +++ b/account_partner_reconcile/tests/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# (http://www.eficent.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import test_account_partner_reconcile diff --git a/account_partner_reconcile/tests/test_account_partner_reconcile.py b/account_partner_reconcile/tests/test_account_partner_reconcile.py new file mode 100644 index 00000000..7b1378df --- /dev/null +++ b/account_partner_reconcile/tests/test_account_partner_reconcile.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Eficent Business and IT Consulting Services S.L. +# (http://www.eficent.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo.tests.common import TransactionCase + + +class TestAccountPartnerReconcile(TransactionCase): + """ + Tests for Account Partner Reconcile. + """ + def setUp(self): + super(TestAccountPartnerReconcile, self).setUp() + + self.partner1 = self.env.ref('base.res_partner_1') + + def test_account_partner_reconcile(self): + + res = self.partner1.action_open_reconcile() + self.assertDictContainsSubset( + { + 'type': 'ir.actions.client', + 'tag': 'manual_reconciliation_view', + }, + res, + 'There was an error and the manual_reconciliation_view ' + 'couldn\'t be opened.' + ) + self.assertDictContainsSubset( + { + 'partner_ids': self.partner1.ids, + 'show_mode_selector': True, + }, + res['context'], + 'There was an error and the manual_reconciliation_view ' + 'couldn\'t be opened.' + ) diff --git a/account_partner_reconcile/views/res_partner_view.xml b/account_partner_reconcile/views/res_partner_view.xml index 93e8722a..865db48d 100644 --- a/account_partner_reconcile/views/res_partner_view.xml +++ b/account_partner_reconcile/views/res_partner_view.xml @@ -1,20 +1,20 @@ - + - - res.partner.view.buttons - res.partner - - - - -
- -
-
-
+ + res.partner.view.buttons + res.partner + + + + +
+ +
+
+
-
+