From 2c6e73a6f37cd5a36c59b38ace984020225e9866 Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Mon, 11 Jul 2022 10:02:41 +0000 Subject: [PATCH] [FIX] account: avoid invisible product_uom_id For a non well identified reason, the user doesn't have the uom group to see the field during the test. this commit adds the group to the user to make it visible during the test as a simple fix. closes odoo/odoo#95741 Signed-off-by: Denis Ledoux (dle) --- addons/account/tests/test_account_move_in_invoice.py | 1 + addons/account/tests/test_account_move_out_invoice.py | 1 + 2 files changed, 2 insertions(+) diff --git a/addons/account/tests/test_account_move_in_invoice.py b/addons/account/tests/test_account_move_in_invoice.py index cf6ecd566bb..59bf4f96847 100644 --- a/addons/account/tests/test_account_move_in_invoice.py +++ b/addons/account/tests/test_account_move_in_invoice.py @@ -125,6 +125,7 @@ class TestAccountMoveInInvoiceOnchanges(AccountTestInvoicingCommon): 'amount_tax': 168.0, 'amount_total': 1128.0, } + cls.env.user.groups_id += cls.env.ref('uom.group_uom') def setUp(self): super(TestAccountMoveInInvoiceOnchanges, self).setUp() diff --git a/addons/account/tests/test_account_move_out_invoice.py b/addons/account/tests/test_account_move_out_invoice.py index 07494c7bc9e..8421167eb1b 100644 --- a/addons/account/tests/test_account_move_out_invoice.py +++ b/addons/account/tests/test_account_move_out_invoice.py @@ -128,6 +128,7 @@ class TestAccountMoveOutInvoiceOnchanges(AccountTestInvoicingCommon): 'amount_tax': 210.0, 'amount_total': 1410.0, } + cls.env.user.groups_id += cls.env.ref('uom.group_uom') def setUp(self): super(TestAccountMoveOutInvoiceOnchanges, self).setUp()