Complete ir_action_window test

Test search_value, context_domain and context model are correclty defined

issue6880
review43711002
This commit is contained in:
Sergi Almacellas Abellana committed 2017-11-20 15:33:22 +01:00
1 parent 87dfddc17a
commit cbf090cdb7
1 file changed
+8
+8
View File
@@ -519,12 +519,20 @@ class ModuleTestCase(unittest.TestCase):
domain = decoder.decode(action_window.pyson_domain)
order = decoder.decode(action_window.pyson_order)
context = decoder.decode(action_window.pyson_context)
search_value = decoder.decode(action_window.pyson_search_value)
if action_window.context_domain:
domain = ['AND', domain,
decoder.decode(action_window.context_domain)]
with Transaction().set_context(context):
Model.search(domain, order=order, limit=action_window.limit)
if search_value:
Model.search(search_value)
for action_domain in action_window.act_window_domains:
if not action_domain.domain:
continue
Model.search(decoder.decode(action_domain.domain))
if action_window.context_model:
pool.get(action_window.context_model)
@with_transaction()
def test_modelsingleton_inherit_order(self):