Skip to content

Commit

Permalink
Port almost all modules to v10 (OCA#305)
Browse files Browse the repository at this point in the history
Port almost all modules to v10

* Update to EPC Rulebook v9.2 that start to apply on 2016-11-20 (bug OCA#300)
  • Loading branch information
Alexis de Lattre authored and trisdoan committed Mar 6, 2024
1 parent 0e48979 commit f5da0ef
Show file tree
Hide file tree
Showing 22 changed files with 81 additions and 109 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# -*- coding: utf-8 -*-
# © 2014 Compassion CH - Cyril Sester <[email protected]>
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# © 2014 Tecnativa - Pedro M. Baeza
# © 2015-2016 Akretion - Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
'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': 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>

0 comments on commit f5da0ef

Please sign in to comment.