mirror of
https://github.com/bringout/oca-ocb-test.git
synced 2026-04-23 15:02:01 +02:00
19.0 vanilla
This commit is contained in:
parent
38c6088dcc
commit
d9452d2060
243 changed files with 30797 additions and 10815 deletions
|
|
@ -5,7 +5,7 @@ import logging
|
|||
import psycopg2
|
||||
|
||||
from odoo.addons.website.controllers.main import Website
|
||||
from odoo.addons.website.tools import MockRequest
|
||||
from odoo.addons.http_routing.tests.common import MockRequest
|
||||
import odoo.tests
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
|
@ -108,15 +108,15 @@ class TestAutoComplete(TransactionCase):
|
|||
test_page.name = 'testTotallyUnique'
|
||||
|
||||
# Editor and Designer see pages in result
|
||||
self._autocomplete_page('testTotallyUnique', 1, False)
|
||||
self._autocomplete_page('testTotallyUnique', 1, None)
|
||||
|
||||
test_page.visibility = 'connected'
|
||||
self._autocomplete_page('testTotallyUnique', 1, False)
|
||||
test_page.visibility = False
|
||||
|
||||
test_page.groups_id = self.env.ref('base.group_public')
|
||||
test_page.group_ids = self.env.ref('base.group_public')
|
||||
self._autocomplete_page('testTotallyUnique', 1, False)
|
||||
test_page.groups_id = False
|
||||
test_page.group_ids = False
|
||||
|
||||
# Public user don't see restricted page
|
||||
saved_env = self.env
|
||||
|
|
@ -126,12 +126,12 @@ class TestAutoComplete(TransactionCase):
|
|||
test_page.website_indexed = True
|
||||
self._autocomplete_page('testTotallyUnique', 1, False)
|
||||
|
||||
test_page.groups_id = self.env.ref('base.group_system')
|
||||
test_page.group_ids = self.env.ref('base.group_system')
|
||||
self._autocomplete_page('testTotallyUnique', 0, "Not found")
|
||||
|
||||
test_page.groups_id = self.env.ref('base.group_public')
|
||||
test_page.group_ids = self.env.ref('base.group_public')
|
||||
self._autocomplete_page('testTotallyUnique', 1, False)
|
||||
test_page.groups_id = False
|
||||
test_page.group_ids = False
|
||||
|
||||
test_page.visibility = 'password'
|
||||
self._autocomplete_page('testTotallyUnique', 0, "Not found")
|
||||
|
|
@ -141,3 +141,11 @@ class TestAutoComplete(TransactionCase):
|
|||
|
||||
# restore website env for next tests
|
||||
self.website.env = self.env = saved_env
|
||||
|
||||
def test_indirect(self):
|
||||
self._autocomplete('module', 4, 'model')
|
||||
self._autocomplete('rechord', 3, 'record')
|
||||
self._autocomplete('suborder', 1, 'submodel')
|
||||
# Sub-sub-fields are currently not supported.
|
||||
# Adapt expected result if this becomes a feature.
|
||||
self._autocomplete('tagg', 0, "Not found")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue