Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port almost all modules to v10 #305

Merged
merged 5 commits into from
Oct 19, 2016
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions account_banking_mandate/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
{
'name': 'Account Banking Mandate',
'summary': 'Banking mandates',
'version': '9.0.1.0.0',
'version': '10.0.1.0.0',
'license': 'AGPL-3',
'author': "Compassion CH, "
"Serv. Tecnol. Avanzados - Pedro M. Baeza, "
"Tecnativa, "
"Akretion, "
"Odoo Community Association (OCA)",
'website': 'https://github.com/OCA/bank-payment',
Expand All @@ -31,6 +31,5 @@
'security/mandate_security.xml',
'security/ir.model.access.csv',
],
'test': ['test/banking_mandate.yml'],
'installable': False,
'installable': True,
}
6 changes: 2 additions & 4 deletions account_banking_mandate/data/mandate_reference_sequence.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<odoo noupdate="1">


<record id="dd_mandate_seq" model="ir.sequence">
Expand All @@ -11,5 +10,4 @@
</record>


</data>
</openerp>
</odoo>
4 changes: 2 additions & 2 deletions account_banking_mandate/models/account_banking_mandate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# © 2015-2016 Akretion - Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields, api, _
from openerp.exceptions import UserError, ValidationError
from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError


class AccountBankingMandate(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion account_banking_mandate/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).


from openerp import models, fields, api
from odoo import models, fields, api


class AccountInvoice(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion account_banking_mandate/models/account_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# © 2016 Akretion (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields, api
from odoo import models, fields, api


class AccountMoveLine(models.Model):
Expand Down
4 changes: 2 additions & 2 deletions account_banking_mandate/models/account_payment_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# © 2015-2016 Akretion - Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields, api, _
from openerp.exceptions import ValidationError, UserError
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError, UserError


class AccountPaymentLine(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion account_banking_mandate/models/account_payment_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# © 2016 Akretion (Alexis de Lattre <[email protected]>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields
from odoo import models, fields


class AccountPaymentMethod(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion account_banking_mandate/models/bank_payment_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# © 2015-2016 Akretion - Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields, api
from odoo import models, fields, api


class BankPaymentLine(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion account_banking_mandate/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# © 2016 Akretion (Alexis de Lattre <[email protected]>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields, api
from odoo import models, fields, api


class ResPartner(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion account_banking_mandate/models/res_partner_bank.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, fields
from odoo import models, fields


class ResPartnerBank(models.Model):
Expand Down
12 changes: 5 additions & 7 deletions account_banking_mandate/security/mandate_security.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <[email protected]>
The licence is in the file __openerp__.py
© 2015-2016 Akretion (Alexis de Lattre <[email protected]>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->

<odoo noupdate="1">

<openerp>
<data noupdate="1">

<record id="account_banking_mandate_rule" model="ir.rule">
<field name="name">Banking Mandate multi-company</field>
Expand All @@ -19,5 +17,5 @@
<field name="perm_create" eval="True"/>
</record>

</data>
</openerp>

</odoo>
35 changes: 0 additions & 35 deletions account_banking_mandate/test/banking_mandate.yml

This file was deleted.

3 changes: 3 additions & 0 deletions account_banking_mandate/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-

from . import test_mandate
22 changes: 22 additions & 0 deletions account_banking_mandate/tests/test_mandate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# © 2016 Akretion (Alexis de Lattre <[email protected]>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo.tests.common import TransactionCase


class TestMandate(TransactionCase):

def test_mandate(self):
bank_account = self.env.ref('account_payment_mode.res_partner_12_iban')
mandate = self.env['account.banking.mandate'].create({
'partner_bank_id': bank_account.id,
'signature_date': '2015-01-01',
})
self.assertEqual(mandate.state, 'draft')
mandate.validate()
self.assertEqual(mandate.state, 'valid')
mandate.cancel()
self.assertEqual(mandate.state, 'cancel')
mandate.back2draft()
self.assertEqual(mandate.state, 'draft')
11 changes: 4 additions & 7 deletions account_banking_mandate/views/account_banking_mandate_view.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 Akretion (http://www.akretion.com)
@author: Alexis de Lattre <[email protected]>
The licence is in the file __openerp__.py
© 2013-2016 Akretion (Alexis de Lattre <[email protected]>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<odoo>


<record id="view_mandate_form" model="ir.ui.view">
Expand Down Expand Up @@ -108,5 +106,4 @@
/>


</data>
</openerp>
</odoo>
15 changes: 7 additions & 8 deletions account_banking_mandate/views/account_invoice_view.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013-2016 Akretion (http://www.akretion.com)
@author: Alexis de Lattre <[email protected]>
The licence is in the file __openerp__.py
© 2013-2016 Akretion (Alexis de Lattre <[email protected]>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<odoo>


<record id="invoice_form" model="ir.ui.view">
<field name="name">add.mandate.on.customer.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account_payment_partner.invoice_form"/>
<field name="arch" type="xml">
<field name="payment_mode_id" position="after">
<field name="partner_bank_id" position="after">
<field name="mandate_id"
domain="[('partner_id', '=', commercial_partner_id), ('state', '=', 'valid')]"
attrs="{'required': [('mandate_required', '=', True)], 'invisible': [('mandate_required', '=', False)]}"/>
Expand All @@ -21,5 +20,5 @@
</field>
</record>

</data>
</openerp>

</odoo>
11 changes: 4 additions & 7 deletions account_banking_mandate/views/account_move_line.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <[email protected]>
The licence is in the file __openerp__.py
© 2016 Akretion (Alexis de Lattre <[email protected]>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->

<openerp>
<data>
<odoo>


<record id="view_move_line_form" model="ir.ui.view">
Expand All @@ -22,5 +20,4 @@
</record>


</data>
</openerp>
</odoo>
4 changes: 2 additions & 2 deletions account_banking_mandate/views/account_payment_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<data>


<record id="account_payment_line_form" model="ir.ui.view">
<field name="name">account_banking_mandate.account.payment.line.form</field>
Expand Down Expand Up @@ -33,5 +33,5 @@
</field>
</record>

</data>

</odoo>
6 changes: 2 additions & 4 deletions account_banking_mandate/views/account_payment_method.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>


<record id="account_payment_method_form" model="ir.ui.view">
Expand All @@ -16,5 +15,4 @@
</record>


</data>
</openerp>
</odoo>
12 changes: 5 additions & 7 deletions account_banking_mandate/views/bank_payment_line_view.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2016 Akretion (http://www.akretion.com)
@author: Alexis de Lattre <[email protected]>
The licence is in the file __openerp__.py
© 2015-2016 Akretion (Alexis de Lattre <[email protected]>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<odoo>


<record id="bank_payment_line_form" model="ir.ui.view">
<field name="name">banking.mandate.bank.payment.line.form</field>
Expand All @@ -32,5 +31,4 @@
</record>


</data>
</openerp>
</odoo>
13 changes: 6 additions & 7 deletions account_banking_mandate/views/res_partner.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 Akretion (http://www.akretion.com)
@author: Alexis de Lattre <[email protected]>
The licence is in the file __openerp__.py
© 2016 Akretion (Alexis de Lattre <[email protected]>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<odoo>


<record id="partner_view_buttons" model="ir.ui.view">
<field name="name">mandate.res.partner.form</field>
Expand All @@ -22,5 +21,5 @@
</field>
</record>

</data>
</openerp>

</odoo>
13 changes: 6 additions & 7 deletions account_banking_mandate/views/res_partner_bank_view.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013-2016 Akretion (http://www.akretion.com)
@author: Alexis de Lattre <[email protected]>
The licence is in the file __openerp__.py
© 2013-2016 Akretion (Alexis de Lattre <[email protected]>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<openerp>
<data>
<odoo>


<record id="mandate_partner_bank_form" model="ir.ui.view">
<field name="name">mandate.res.partner.bank.form</field>
Expand All @@ -31,5 +30,5 @@
</field>
</record>

</data>
</openerp>

</odoo>
2 changes: 1 addition & 1 deletion account_banking_mandate_sale/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The mandate will be copied from the sale order to the invoice.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/173/9.0
:target: https://runbot.odoo-community.org/runbot/173/10.0

Known issues / Roadmap
======================
Expand Down
Loading