-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreate_wizard_views.xml
More file actions
86 lines (78 loc) · 4.71 KB
/
create_wizard_views.xml
File metadata and controls
86 lines (78 loc) · 4.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- ══════════════════════════════════════════════════════════════════════════
CREATE WIZARD - SINGLE STEP WITH PROGRESSIVE DISCLOSURE
══════════════════════════════════════════════════════════════════════════ -->
<record id="view_cr_create_wizard_form" model="ir.ui.view">
<field name="name">spp.cr.create.wizard.form</field>
<field name="model">spp.cr.create.wizard</field>
<field name="arch" type="xml">
<form string="New Change Request">
<sheet>
<div class="oe_title mb-3">
<h2>New Change Request</h2>
</div>
<!-- Freeze warning at top if applicable -->
<field name="is_frozen" invisible="1"/>
<div invisible="not is_frozen" class="mb-3">
<field name="freeze_message" nolabel="1" readonly="1"/>
</div>
<!-- Type Selection -->
<group>
<group>
<field name="request_type_id"
string="Request Type"
options="{'no_create': True, 'no_open': True}"
placeholder="Select a change request type..."
widget="selection"/>
</group>
</group>
<!-- Hidden fields -->
<field name="show_registrant" invisible="1"/>
<field name="registrant_id" invisible="1"/>
<field name="_selected_partner_id" invisible="1"/>
<field name="_search_page" invisible="1"/>
<!-- Registrant Search (shown after type selected, hidden after selection) -->
<group invisible="not show_registrant or registrant_id">
<group>
<field name="search_text"
string="Search Registrant"
placeholder="Enter name or ID number..."
widget="search_delay"/>
</group>
</group>
<!-- Search Results (clickable rows, handled by widget) -->
<div class="w-100" invisible="not search_results_html or registrant_id">
<field name="search_results_html" nolabel="1" readonly="1"
widget="cr_search_results"/>
</div>
<!-- Selected registrant info -->
<div class="alert alert-success py-2 mb-3" role="status" invisible="not registrant_id">
<field name="registrant_info_html" nolabel="1" readonly="1"/>
<button name="action_clear_registrant" type="object"
string="Change Registrant" class="btn btn-sm btn-outline-secondary mt-2"
icon="fa-pencil"/>
</div>
</sheet>
<footer>
<button string="Create"
name="action_create_draft"
type="object"
class="btn-primary"
invisible="not request_type_id or not registrant_id"/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
<!-- ══════════════════════════════════════════════════════════════════════════
CREATE WIZARD - ACTION
══════════════════════════════════════════════════════════════════════════ -->
<record id="action_cr_create_wizard" model="ir.actions.act_window">
<field name="name">New Change Request</field>
<field name="res_model">spp.cr.create.wizard</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_cr_create_wizard_form"/>
<field name="target">new</field>
</record>
</odoo>