|
63 | 63 | <div class="oe_title"> |
64 | 64 | <label for="name"/> |
65 | 65 | <h1> |
66 | | - <field name="name" placeholder="e.g., Typhoon Yolanda"/> |
| 66 | + <field name="name" placeholder="e.g., Typhoon Yolanda" |
| 67 | + readonly="status == 'closed'"/> |
67 | 68 | </h1> |
68 | 69 | </div> |
69 | 70 | <group> |
70 | 71 | <group name="main_info"> |
71 | | - <field name="code" placeholder="e.g., 2013-YOLANDA"/> |
72 | | - <field name="category_id" options="{'no_create': True}"/> |
73 | | - <field name="severity"/> |
| 72 | + <field name="code" placeholder="e.g., 2013-YOLANDA" |
| 73 | + readonly="status == 'closed'"/> |
| 74 | + <field name="category_id" options="{'no_create': True}" |
| 75 | + readonly="status == 'closed'"/> |
| 76 | + <field name="severity" |
| 77 | + readonly="status == 'closed'"/> |
74 | 78 | </group> |
75 | 79 | <group name="dates"> |
76 | | - <field name="start_date"/> |
77 | | - <field name="end_date"/> |
| 80 | + <field name="start_date" |
| 81 | + readonly="status == 'closed'"/> |
| 82 | + <field name="end_date" |
| 83 | + readonly="status == 'closed'"/> |
78 | 84 | <field name="is_ongoing" invisible="1"/> |
79 | 85 | </group> |
80 | 86 | </group> |
81 | 87 | <notebook> |
82 | 88 | <page string="Description" name="description"> |
83 | | - <field name="description" placeholder="Describe the incident in detail..."/> |
| 89 | + <field name="description" placeholder="Describe the incident in detail..." |
| 90 | + readonly="status == 'closed'"/> |
84 | 91 | </page> |
85 | 92 | <page string="Affected Areas" name="areas"> |
86 | | - <p class="text-muted">Add areas affected by this incident. Specify severity and population estimates for each area.</p> |
87 | | - <field name="incident_area_ids"> |
| 93 | + <p class="text-muted" invisible="status == 'closed'">Add areas affected by this incident. Specify severity and population estimates for each area.</p> |
| 94 | + <field name="incident_area_ids" readonly="status == 'closed'"> |
88 | 95 | <list editable="bottom"> |
89 | 96 | <field name="area_id" options="{'no_create': True}"/> |
90 | 97 | <field name="severity_override"/> |
|
94 | 101 | </field> |
95 | 102 | </page> |
96 | 103 | <page string="Impacts" name="impacts"> |
97 | | - <field name="impact_ids"> |
| 104 | + <field name="impact_ids" readonly="status == 'closed'"> |
98 | 105 | <list> |
99 | 106 | <field name="registrant_id"/> |
100 | 107 | <field name="impact_type_id"/> |
|
0 commit comments