1 <?xml version="1.0" encoding="utf-8"?>
5 <record id="view_test_exceptions_model" model="ir.ui.view">
6 <field name="name">Test exceptions</field>
7 <field name="model">test.exceptions.model</field>
8 <field name="arch" type="xml">
9 <form string="Test exceptions">
10 <label string="Each button generates a specific exception on the server. The text on the right is the expected representation of the exception when displayed on the client. Button marked with a '*' use safe_eval()."/>
11 <separator string="" colspan="8"/>
12 <group colspan="8" col="8">
13 <group colspan="4" col="8">
14 <group colspan="8" col="8">
15 <button name="generate_except_osv" string="except_osv" type="object" icon="gtk-ok" colspan="1"/>
16 <label string="Warning-description"/>
18 <group colspan="8" col="8">
19 <button name="generate_except_orm" string="except_orm" type="object" icon="gtk-ok" colspan="1"/>
20 <label string="Warning-description"/>
22 <group colspan="8" col="8">
23 <button name="generate_warning" string="Warning" type="object" icon="gtk-ok" colspan="1"/>
24 <label string="Warning-description"/>
26 <group colspan="8" col="8">
27 <button name="generate_redirect_warning" string="RedirectWarning" type="object" icon="gtk-ok" colspan="1"/>
28 <label string="Warning-description-redirection button"/>
30 <group colspan="8" col="8">
31 <button name="generate_access_denied" string="AccessDenied" type="object" icon="gtk-ok" colspan="1"/>
32 <label string="Access denied-traceback"/>
34 <group colspan="8" col="8">
35 <button name="generate_access_error" string="AccessError" type="object" icon="gtk-ok" colspan="1"/>
36 <label string="Access rights error-description"/>
38 <group colspan="8" col="8">
39 <button name="generate_exc_access_denied" string="Exc AccessDenied" type="object" icon="gtk-ok" colspan="1"/>
40 <label string="Access denied-traceback"/>
42 <group colspan="8" col="8">
43 <button name="generate_undefined" string="Undefined" type="object" icon="gtk-ok" colspan="1"/>
44 <label string="Server error-traceback"/>
47 <group colspan="4" col="8">
48 <group colspan="8" col="8">
49 <button name="generate_except_osv_safe_eval" string="except_osv*" type="object" icon="gtk-ok" colspan="1"/>
50 <label string="Warning-description"/>
52 <group colspan="8" col="8">
53 <button name="generate_except_orm_safe_eval" string="except_orm*" type="object" icon="gtk-ok" colspan="1"/>
54 <label string="Warning-description"/>
56 <group colspan="8" col="8">
57 <button name="generate_warning_safe_eval" string="Warning*" type="object" icon="gtk-ok" colspan="1"/>
58 <label string="Warning-description"/>
60 <group colspan="8" col="8">
61 <button name="generate_redirect_warning_safe_eval" string="RedirectWarning*" type="object" icon="gtk-ok" colspan="1"/>
62 <label string="Warning-description-redirection button"/>
64 <group colspan="8" col="8">
65 <button name="generate_access_denied_safe_eval" string="AccessDenied*" type="object" icon="gtk-ok" colspan="1"/>
66 <label string="Access denied-traceback"/>
68 <group colspan="8" col="8">
69 <button name="generate_access_error_safe_eval" string="AccessError*" type="object" icon="gtk-ok" colspan="1"/>
70 <label string="Access rights error-description"/>
72 <group colspan="8" col="8">
73 <button name="generate_exc_access_denied_safe_eval" string="Exc AccessDenied*" type="object" icon="gtk-ok" colspan="1"/>
74 <label string="Access denied-traceback"/>
76 <group colspan="8" col="8">
77 <button name="generate_undefined_safe_eval" string="Undefined*" type="object" icon="gtk-ok" colspan="1"/>
78 <label string="Server error-traceback"/>
86 <record id="action_test_exceptions" model="ir.actions.act_window">
87 <field name="name">Test exceptions</field>
88 <field name="type">ir.actions.act_window</field>
89 <field name="res_model">test.exceptions.model</field>
90 <field name="view_type">form</field>
91 <field name="view_mode">form</field>
92 <field name="target">new</field>
95 <menuitem icon="STOCK_PREFERENCES" id="base.menu_tests" name="Tests" sequence="1000000"/>
97 <menuitem id="menu_test_exceptions" parent="base.menu_tests" name="Test exceptions"/>
99 <menuitem id="menu_test_exceptions_leaf"
100 name="Test exceptions"
101 action="action_test_exceptions"
102 parent="menu_test_exceptions"/>