diff --git a/account_invoice_show_currency_rate/__manifest__.py b/account_invoice_show_currency_rate/__manifest__.py index 47e377dbd48..0ab6b411af7 100644 --- a/account_invoice_show_currency_rate/__manifest__.py +++ b/account_invoice_show_currency_rate/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Account Invoice Show Currency Rate", "summary": "Show currency rate in invoices.", - "version": "13.0.1.0.2", + "version": "16.0.1.0.0", "category": "Accounting & Finance", "website": "https://github.com/OCA/account-invoicing", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/account_invoice_show_currency_rate/tests/test_account_move.py b/account_invoice_show_currency_rate/tests/test_account_move.py index ef4fa92396d..ce99766ca9a 100644 --- a/account_invoice_show_currency_rate/tests/test_account_move.py +++ b/account_invoice_show_currency_rate/tests/test_account_move.py @@ -24,11 +24,12 @@ def setUpClass(cls): "taxes_id": [(6, 0, [cls.account_tax.id])], } ) + cls.account = cls.env["account.account"].create( { "name": "Test Account", "code": "TEST", - "user_type_id": cls.env.ref("account.data_account_type_receivable").id, + "account_type": "asset_receivable", "reconcile": True, } ) @@ -36,9 +37,7 @@ def setUpClass(cls): { "name": "Test Account", "code": "ACC", - "user_type_id": cls.env.ref( - "account.data_account_type_other_income" - ).id, + "account_type": "income_other", "reconcile": True, } ) @@ -62,10 +61,9 @@ def _create_currency_rate(self, currency_id, name, rate): def _create_invoice(self, currency_id): move_form = Form( - self.env["account.move"].with_context(default_type="out_invoice") + self.env["account.move"].with_context(default_move_type="out_invoice") ) move_form.partner_id = self.partner - move_form.journal_id = self.journal move_form.invoice_date = fields.Date.from_string("2000-01-01") move_form.currency_id = currency_id with move_form.invoice_line_ids.new() as line_form: diff --git a/account_invoice_show_currency_rate/views/account_move_view.xml b/account_invoice_show_currency_rate/views/account_move_view.xml index c00c712f7f9..1cbeac424f5 100644 --- a/account_invoice_show_currency_rate/views/account_move_view.xml +++ b/account_invoice_show_currency_rate/views/account_move_view.xml @@ -8,7 +8,7 @@ License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). account.move - + - +