diff options
| author | Ankita Raval <anr@odoo.com> | 2019-10-30 06:11:02 +0000 |
|---|---|---|
| committer | Jigar Vaghela <jva@odoo.com> | 2020-02-19 09:09:20 +0000 |
| commit | d675dbaa4c7174591e0e7c1a3caf3e76877312ce (patch) | |
| tree | 40840df0a36cb9a6ba3b918835da2a40a07e3a3b /addons/l10n_be_edi | |
| parent | 8f6bf2087e50020bfad4e336b1d4c5a98a4fa84f (diff) | |
[IMP] account,* : Change type field to move_type in account.move
task-id: 2028z813
Diffstat (limited to 'addons/l10n_be_edi')
| -rw-r--r-- | addons/l10n_be_edi/models/account_invoice.py | 4 | ||||
| -rw-r--r-- | addons/l10n_be_edi/tests/test_ubl.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/l10n_be_edi/models/account_invoice.py b/addons/l10n_be_edi/models/account_invoice.py index d6d755e71e1..1850c775cdf 100644 --- a/addons/l10n_be_edi/models/account_invoice.py +++ b/addons/l10n_be_edi/models/account_invoice.py @@ -44,9 +44,9 @@ class AccountMove(models.Model): else: type = 'in_invoice' - default_journal = self.with_context(default_type=type)._get_default_journal() + default_journal = self.with_context(default_move_type=type)._get_default_journal() - with Form(self.with_context(default_type=type, default_journal_id=default_journal.id)) as invoice_form: + with Form(self.with_context(default_move_type=type, default_journal_id=default_journal.id)) as invoice_form: # Reference elements = tree.xpath('//cbc:ID', namespaces=namespaces) if elements: diff --git a/addons/l10n_be_edi/tests/test_ubl.py b/addons/l10n_be_edi/tests/test_ubl.py index 37ef7bd9984..2680b7bca52 100644 --- a/addons/l10n_be_edi/tests/test_ubl.py +++ b/addons/l10n_be_edi/tests/test_ubl.py @@ -16,7 +16,7 @@ class TestUBL(common.TransactionCase): def test_ubl_invoice_import(self): xml_file_path = get_module_resource('l10n_be_edi', 'test_xml_file', 'efff_test.xml') xml_file = open(xml_file_path, 'rb').read() - invoice = self.env['account.move'].with_context(default_type='in_invoice').create({}) + invoice = self.env['account.move'].with_context(default_move_type='in_invoice').create({}) attachment_id = self.env['ir.attachment'].create({ 'name': 'efff_test.xml', |
