From 49352afae0eb140ca7d64c128662b448d9b7e92a Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Fri, 5 Jun 2020 06:21:16 +0000 Subject: [PATCH] [FIX] account: Fix broken 'test_01_portal_attachment' in l10n builds X-original-commit: 695bd89ccc925e058b8cfd2b699e209ef6114c58 --- addons/account/tests/test_portal_attachment.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/addons/account/tests/test_portal_attachment.py b/addons/account/tests/test_portal_attachment.py index 6d6ab3c319c..999f504e128 100644 --- a/addons/account/tests/test_portal_attachment.py +++ b/addons/account/tests/test_portal_attachment.py @@ -14,18 +14,17 @@ class TestUi(tests.HttpCase): def test_01_portal_attachment(self): """Test the portal chatter attachment route.""" - miscellaneous_journal = self.env['account.journal'].create({ - 'name': 'Miscellaneous - Test', - 'code': 'TMISC', - 'type': 'general', - 'show_on_dashboard': False, - }) + partner = self.env['res.partner'].create({'name': 'Test partner'}) base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url') # For this test we need a parent document with an access_token field # (in this case from portal.mixin) and also inheriting mail.thread. invoice = self.env['account.move'].with_context(tracking_disable=True).create({ - 'name': 'a record with an access_token field', + 'move_type': 'out_invoice', + 'date': '2017-01-01', + 'invoice_date': '2017-01-01', + 'partner_id': partner.id, + 'invoice_line_ids': [(0, 0, {'name': 'aaaa', 'price_unit': 100.0})], }) # Test public user can't create attachment without token of document