[ADD] web_widget_pattern

This commit is contained in:
Holger Brunn
2024-04-23 17:17:04 +02:00
parent 5f6aa6c566
commit 7a59f5ef4d
33 changed files with 1373 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Copyright 2024 Hunki Enterprises BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)
from odoo.tests.common import TransactionCase
class TestWebWidgetPattern(TransactionCase):
def test_fields_get(self):
ResPartner = self.env["res.partner"]
ResPartner._fields["street2"].pattern = "[0-9]"
field_description = ResPartner.get_views(
[(self.env.ref("base.view_partner_form").id, "form")]
)["models"]["res.partner"]["street2"]
self.assertEqual(field_description["pattern"], "[0-9]")