-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] web_widget_open_tab: Migration to 17.0
- Loading branch information
1 parent
5c423c8
commit 5ab1cf6
Showing
5 changed files
with
35 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import test_main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from odoo.tests import common | ||
|
||
|
||
class Test(common.TransactionCase): | ||
def test_add_open_tab_field(self): | ||
self.env["ir.model"]._get("res.company").add_open_tab_field = True | ||
arch, view = self.env["res.company"]._get_view(view_id=None, view_type="tree") | ||
found = arch.xpath("//field[@widget='open_tab']") | ||
self.assertEqual(len(found), 1) | ||
|
||
def test_no_add_open_tab_field(self): | ||
self.env["ir.model"]._get("res.company").add_open_tab_field = False | ||
arch, view = self.env["res.company"]._get_view(view_id=None, view_type="tree") | ||
found = arch.xpath("//field[@widget='open_tab']") | ||
self.assertFalse(found) | ||
|
||
def test_add_open_tab_field_no_name_field(self): | ||
self.env["ir.model"]._get("res.groups").add_open_tab_field = True | ||
arch, view = self.env["res.groups"]._get_view(view_id=None, view_type="tree") | ||
found = arch.xpath("//field[@widget='open_tab']") | ||
self.assertEqual(len(found), 1) |