forked from OCA/bank-payment
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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)
- Loading branch information
Showing
10 changed files
with
30 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 0 additions & 52 deletions
52
account_banking_sepa_credit_transfer/migrations/8.0.0.3/post-migration.py
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
account_banking_sepa_credit_transfer/migrations/8.0.0.3/pre-migration.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 AccountPaymentMethod(models.Model): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,18 @@ | |
# © 2016 Akretion (Alexis de Lattre <[email protected]>) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from openerp import SUPERUSER_ID | ||
from odoo import api, SUPERUSER_ID | ||
|
||
|
||
def update_bank_journals(cr, pool): | ||
ajo = pool['account.journal'] | ||
journal_ids = ajo.search( | ||
cr, SUPERUSER_ID, [('type', '=', 'bank')]) | ||
sct_id = pool['ir.model.data'].xmlid_to_res_id( | ||
cr, SUPERUSER_ID, | ||
'account_banking_sepa_credit_transfer.sepa_credit_transfer') | ||
if sct_id: | ||
ajo.write(cr, SUPERUSER_ID, journal_ids, { | ||
'outbound_payment_method_ids': [(4, sct_id)], | ||
}) | ||
def update_bank_journals(cr, registry): | ||
with api.Environment.manage(): | ||
env = api.Environment(cr, SUPERUSER_ID, {}) | ||
ajo = env['account.journal'] | ||
journals = ajo.search([('type', '=', 'bank')]) | ||
sct = env.ref( | ||
'account_banking_sepa_credit_transfer.sepa_credit_transfer') | ||
if sct: | ||
journals.write({ | ||
'outbound_payment_method_ids': [(4, sct.id)], | ||
}) | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
# © 2016 Akretion (Alexis de Lattre <[email protected]>) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from openerp.addons.account.tests.account_test_classes\ | ||
from odoo.addons.account.tests.account_test_classes\ | ||
import AccountingTestCase | ||
from openerp.tools import float_compare | ||
from odoo.tools import float_compare | ||
import time | ||
from lxml import etree | ||
|
||
|
@@ -56,6 +56,9 @@ def setUp(self): | |
self.eur_currency = self.env.ref('base.EUR') | ||
self.usd_currency = self.env.ref('base.USD') | ||
self.main_company.currency_id = self.eur_currency.id | ||
# Trigger the recompute of account type on res.partner.bank | ||
for bank_acc in self.partner_bank_model.search([]): | ||
bank_acc.acc_number = bank_acc.acc_number | ||
|
||
def test_eur_currency_sct(self): | ||
invoice1 = self.create_invoice( | ||
|
@@ -126,7 +129,6 @@ def test_eur_currency_sct(self): | |
self.assertEquals(attachment.datas_fname[-4:], '.xml') | ||
xml_file = attachment.datas.decode('base64') | ||
xml_root = etree.fromstring(xml_file) | ||
# print "xml_file=", etree.tostring(xml_root, pretty_print=True) | ||
namespaces = xml_root.nsmap | ||
namespaces['p'] = xml_root.nsmap[None] | ||
namespaces.pop(None) | ||
|
@@ -204,7 +206,6 @@ def test_usd_currency_sct(self): | |
self.assertEquals(attachment.datas_fname[-4:], '.xml') | ||
xml_file = attachment.datas.decode('base64') | ||
xml_root = etree.fromstring(xml_file) | ||
# print "xml_file=", etree.tostring(xml_root, pretty_print=True) | ||
namespaces = xml_root.nsmap | ||
namespaces['p'] = xml_root.nsmap[None] | ||
namespaces.pop(None) | ||
|
@@ -247,5 +248,5 @@ def create_invoice( | |
'name': 'Great service', | ||
'account_id': self.account_expense.id, | ||
}) | ||
invoice.signal_workflow('invoice_open') | ||
invoice.action_invoice_open() | ||
return invoice |