Skip to content

Commit 5cf929a

Browse files
Alexis de Lattregfcapalbo
Alexis de Lattre
authored andcommitted
Port almost all modules to v10 (OCA#305)
Port almost all modules to v10 * Update to EPC Rulebook v9.2 that start to apply on 2016-11-20 (bug OCA#300)
1 parent 8dd7f7a commit 5cf929a

22 files changed

+81
-109
lines changed

account_banking_mandate/__openerp__.py renamed to account_banking_mandate/__manifest__.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# -*- coding: utf-8 -*-
22
# © 2014 Compassion CH - Cyril Sester <[email protected]>
3-
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
3+
# © 2014 Tecnativa - Pedro M. Baeza
44
# © 2015-2016 Akretion - Alexis de Lattre <[email protected]>
55
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
66

77
{
88
'name': 'Account Banking Mandate',
99
'summary': 'Banking mandates',
10-
'version': '9.0.1.0.0',
10+
'version': '10.0.1.0.0',
1111
'license': 'AGPL-3',
1212
'author': "Compassion CH, "
13-
"Serv. Tecnol. Avanzados - Pedro M. Baeza, "
13+
"Tecnativa, "
1414
"Akretion, "
1515
"Odoo Community Association (OCA)",
1616
'website': 'https://github.com/OCA/bank-payment',
@@ -31,6 +31,5 @@
3131
'security/mandate_security.xml',
3232
'security/ir.model.access.csv',
3333
],
34-
'test': ['test/banking_mandate.yml'],
3534
'installable': True,
3635
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<openerp>
3-
<data noupdate="1">
2+
<odoo noupdate="1">
43

54

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

1312

14-
</data>
15-
</openerp>
13+
</odoo>

account_banking_mandate/models/account_banking_mandate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# © 2015-2016 Akretion - Alexis de Lattre <[email protected]>
55
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
66

7-
from openerp import models, fields, api, _
8-
from openerp.exceptions import UserError, ValidationError
7+
from odoo import models, fields, api, _
8+
from odoo.exceptions import UserError, ValidationError
99

1010

1111
class AccountBankingMandate(models.Model):

account_banking_mandate/models/account_invoice.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
66

77

8-
from openerp import models, fields, api
8+
from odoo import models, fields, api
99

1010

1111
class AccountInvoice(models.Model):

account_banking_mandate/models/account_move_line.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# © 2016 Akretion (http://www.akretion.com/)
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
44

5-
from openerp import models, fields, api
5+
from odoo import models, fields, api
66

77

88
class AccountMoveLine(models.Model):

account_banking_mandate/models/account_payment_line.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# © 2015-2016 Akretion - Alexis de Lattre <[email protected]>
55
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
66

7-
from openerp import models, fields, api, _
8-
from openerp.exceptions import ValidationError, UserError
7+
from odoo import models, fields, api, _
8+
from odoo.exceptions import ValidationError, UserError
99

1010

1111
class AccountPaymentLine(models.Model):

account_banking_mandate/models/account_payment_method.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# © 2016 Akretion (Alexis de Lattre <[email protected]>)
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
44

5-
from openerp import models, fields
5+
from odoo import models, fields
66

77

88
class AccountPaymentMethod(models.Model):

account_banking_mandate/models/bank_payment_line.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# © 2015-2016 Akretion - Alexis de Lattre <[email protected]>
55
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
66

7-
from openerp import models, fields, api
7+
from odoo import models, fields, api
88

99

1010
class BankPaymentLine(models.Model):

account_banking_mandate/models/res_partner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# © 2016 Akretion (Alexis de Lattre <[email protected]>)
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
44

5-
from openerp import models, fields, api
5+
from odoo import models, fields, api
66

77

88
class ResPartner(models.Model):

account_banking_mandate/models/res_partner_bank.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
44
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
55

6-
from openerp import models, fields
6+
from odoo import models, fields
77

88

99
class ResPartnerBank(models.Model):
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright (C) 2015 Akretion (http://www.akretion.com/)
4-
@author: Alexis de Lattre <[email protected]>
5-
The licence is in the file __openerp__.py
3+
© 2015-2016 Akretion (Alexis de Lattre <[email protected]>)
4+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
65
-->
76

7+
<odoo noupdate="1">
88

9-
<openerp>
10-
<data noupdate="1">
119

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

22-
</data>
23-
</openerp>
20+
21+
</odoo>

account_banking_mandate/test/banking_mandate.yml

-35
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# -*- coding: utf-8 -*-
2+
3+
from . import test_mandate
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# -*- coding: utf-8 -*-
2+
# © 2016 Akretion (Alexis de Lattre <[email protected]>)
3+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4+
5+
from odoo.tests.common import TransactionCase
6+
7+
8+
class TestMandate(TransactionCase):
9+
10+
def test_mandate(self):
11+
bank_account = self.env.ref('account_payment_mode.res_partner_12_iban')
12+
mandate = self.env['account.banking.mandate'].create({
13+
'partner_bank_id': bank_account.id,
14+
'signature_date': '2015-01-01',
15+
})
16+
self.assertEqual(mandate.state, 'draft')
17+
mandate.validate()
18+
self.assertEqual(mandate.state, 'valid')
19+
mandate.cancel()
20+
self.assertEqual(mandate.state, 'cancel')
21+
mandate.back2draft()
22+
self.assertEqual(mandate.state, 'draft')

account_banking_mandate/views/account_banking_mandate_view.xml

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright (C) 2013 Akretion (http://www.akretion.com)
4-
@author: Alexis de Lattre <[email protected]>
5-
The licence is in the file __openerp__.py
3+
© 2013-2016 Akretion (Alexis de Lattre <[email protected]>)
4+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
65
-->
7-
<openerp>
8-
<data>
6+
<odoo>
97

108

119
<record id="view_mandate_form" model="ir.ui.view">
@@ -108,5 +106,4 @@
108106
/>
109107

110108

111-
</data>
112-
</openerp>
109+
</odoo>
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright (C) 2013-2016 Akretion (http://www.akretion.com)
4-
@author: Alexis de Lattre <[email protected]>
5-
The licence is in the file __openerp__.py
3+
© 2013-2016 Akretion (Alexis de Lattre <[email protected]>)
4+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
65
-->
7-
<openerp>
8-
<data>
6+
<odoo>
7+
98

109
<record id="invoice_form" model="ir.ui.view">
1110
<field name="name">add.mandate.on.customer.invoice.form</field>
1211
<field name="model">account.invoice</field>
1312
<field name="inherit_id" ref="account_payment_partner.invoice_form"/>
1413
<field name="arch" type="xml">
15-
<field name="payment_mode_id" position="after">
14+
<field name="partner_bank_id" position="after">
1615
<field name="mandate_id"
1716
domain="[('partner_id', '=', commercial_partner_id), ('state', '=', 'valid')]"
1817
attrs="{'required': [('mandate_required', '=', True)], 'invisible': [('mandate_required', '=', False)]}"/>
@@ -21,5 +20,5 @@
2120
</field>
2221
</record>
2322

24-
</data>
25-
</openerp>
23+
24+
</odoo>

account_banking_mandate/views/account_move_line.xml

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

8-
<openerp>
9-
<data>
7+
<odoo>
108

119

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

2422

25-
</data>
26-
</openerp>
23+
</odoo>

account_banking_mandate/views/account_payment_line.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
55
-->
66
<odoo>
7-
<data>
7+
88

99
<record id="account_payment_line_form" model="ir.ui.view">
1010
<field name="name">account_banking_mandate.account.payment.line.form</field>
@@ -33,5 +33,5 @@
3333
</field>
3434
</record>
3535

36-
</data>
36+
3737
</odoo>

account_banking_mandate/views/account_payment_method.xml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<openerp>
3-
<data>
2+
<odoo>
43

54

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

1817

19-
</data>
20-
</openerp>
18+
</odoo>

account_banking_mandate/views/bank_payment_line_view.xml

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright (C) 2015-2016 Akretion (http://www.akretion.com)
4-
@author: Alexis de Lattre <[email protected]>
5-
The licence is in the file __openerp__.py
3+
© 2015-2016 Akretion (Alexis de Lattre <[email protected]>)
4+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
65
-->
7-
<openerp>
8-
<data>
6+
<odoo>
7+
98

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

3433

35-
</data>
36-
</openerp>
34+
</odoo>

account_banking_mandate/views/res_partner.xml

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright (C) 2016 Akretion (http://www.akretion.com)
4-
@author: Alexis de Lattre <[email protected]>
5-
The licence is in the file __openerp__.py
3+
© 2016 Akretion (Alexis de Lattre <[email protected]>)
4+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
65
-->
7-
<openerp>
8-
<data>
6+
<odoo>
7+
98

109
<record id="partner_view_buttons" model="ir.ui.view">
1110
<field name="name">mandate.res.partner.form</field>
@@ -22,5 +21,5 @@
2221
</field>
2322
</record>
2423

25-
</data>
26-
</openerp>
24+
25+
</odoo>

account_banking_mandate/views/res_partner_bank_view.xml

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
Copyright (C) 2013-2016 Akretion (http://www.akretion.com)
4-
@author: Alexis de Lattre <[email protected]>
5-
The licence is in the file __openerp__.py
3+
© 2013-2016 Akretion (Alexis de Lattre <[email protected]>)
4+
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
65
-->
7-
<openerp>
8-
<data>
6+
<odoo>
7+
98

109
<record id="mandate_partner_bank_form" model="ir.ui.view">
1110
<field name="name">mandate.res.partner.bank.form</field>
@@ -31,5 +30,5 @@
3130
</field>
3231
</record>
3332

34-
</data>
35-
</openerp>
33+
34+
</odoo>

0 commit comments

Comments
 (0)