|
@ -3,6 +3,7 @@ |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). |
|
|
from odoo.exceptions import ValidationError |
|
|
from odoo.exceptions import ValidationError |
|
|
from odoo.tests.common import TransactionCase |
|
|
from odoo.tests.common import TransactionCase |
|
|
|
|
|
from odoo.tools import mute_logger |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestWebMenuNavbarNeedaction(TransactionCase): |
|
|
class TestWebMenuNavbarNeedaction(TransactionCase): |
|
@ -10,5 +11,5 @@ class TestWebMenuNavbarNeedaction(TransactionCase): |
|
|
main_menus = self.env['ir.ui.menu'].search([('parent_id', '=', False)]) |
|
|
main_menus = self.env['ir.ui.menu'].search([('parent_id', '=', False)]) |
|
|
data = main_menus.get_navbar_needaction_data() |
|
|
data = main_menus.get_navbar_needaction_data() |
|
|
self.assertEqual(len(main_menus), len(data)) |
|
|
self.assertEqual(len(main_menus), len(data)) |
|
|
with self.assertRaises(ValidationError): |
|
|
|
|
|
|
|
|
with mute_logger('odoo.models'), self.assertRaises(ValidationError): |
|
|
main_menus[:1].write({'needaction_domain': '['}) |
|
|
main_menus[:1].write({'needaction_domain': '['}) |