|
2 | 2 | # © 2016 Akretion (Alexis de Lattre <[email protected]>)
|
3 | 3 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
4 | 4 |
|
5 |
| -from openerp.addons.account.tests.account_test_classes\ |
| 5 | +from odoo.addons.account.tests.account_test_classes\ |
6 | 6 | import AccountingTestCase
|
7 |
| -from openerp.tools import float_compare |
| 7 | +from odoo.tools import float_compare |
8 | 8 | import time
|
9 | 9 | from lxml import etree
|
10 | 10 |
|
@@ -56,6 +56,9 @@ def setUp(self):
|
56 | 56 | self.eur_currency = self.env.ref('base.EUR')
|
57 | 57 | self.usd_currency = self.env.ref('base.USD')
|
58 | 58 | self.main_company.currency_id = self.eur_currency.id
|
| 59 | + # Trigger the recompute of account type on res.partner.bank |
| 60 | + for bank_acc in self.partner_bank_model.search([]): |
| 61 | + bank_acc.acc_number = bank_acc.acc_number |
59 | 62 |
|
60 | 63 | def test_eur_currency_sct(self):
|
61 | 64 | invoice1 = self.create_invoice(
|
@@ -126,7 +129,6 @@ def test_eur_currency_sct(self):
|
126 | 129 | self.assertEquals(attachment.datas_fname[-4:], '.xml')
|
127 | 130 | xml_file = attachment.datas.decode('base64')
|
128 | 131 | xml_root = etree.fromstring(xml_file)
|
129 |
| - # print "xml_file=", etree.tostring(xml_root, pretty_print=True) |
130 | 132 | namespaces = xml_root.nsmap
|
131 | 133 | namespaces['p'] = xml_root.nsmap[None]
|
132 | 134 | namespaces.pop(None)
|
@@ -204,7 +206,6 @@ def test_usd_currency_sct(self):
|
204 | 206 | self.assertEquals(attachment.datas_fname[-4:], '.xml')
|
205 | 207 | xml_file = attachment.datas.decode('base64')
|
206 | 208 | xml_root = etree.fromstring(xml_file)
|
207 |
| - # print "xml_file=", etree.tostring(xml_root, pretty_print=True) |
208 | 209 | namespaces = xml_root.nsmap
|
209 | 210 | namespaces['p'] = xml_root.nsmap[None]
|
210 | 211 | namespaces.pop(None)
|
@@ -247,5 +248,5 @@ def create_invoice(
|
247 | 248 | 'name': 'Great service',
|
248 | 249 | 'account_id': self.account_expense.id,
|
249 | 250 | })
|
250 |
| - invoice.signal_workflow('invoice_open') |
| 251 | + invoice.action_invoice_open() |
251 | 252 | return invoice
|
0 commit comments