Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
Fix UI layout required by Odoo17 XML form layout
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalesedwin1123 committed Feb 2, 2024
1 parent 2eeca73 commit 4a5b45b
Show file tree
Hide file tree
Showing 2 changed files with 194 additions and 118 deletions.
180 changes: 106 additions & 74 deletions spp_change_request/views/change_request_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Part of OpenSPP. See LICENSE file for full copyright and licensing details.
readonly="state != 'draft' or request_type_ref_id"
class="oe_inline"
/>
<field
<!-- <field
name="qr_code_details"
widget="id_document_qrreader_field"
icon="fa-qrcode"
Expand All @@ -190,7 +190,7 @@ Part of OpenSPP. See LICENSE file for full copyright and licensing details.
invisible="state != 'draft' or request_type_ref_id"
class="oe_inline"
style="margin-left: 10px;"
/>
/> -->
</h2>
<label for="applicant_id" string="Applicant:" />
<h3>
Expand All @@ -204,7 +204,7 @@ Part of OpenSPP. See LICENSE file for full copyright and licensing details.
class="oe_inline"
/>
<!-- ID Document Scanner Widget -->
<field
<!-- <field
name="id_document_details"
widget="id_document_reader_field"
icon="fa-id-card-o"
Expand All @@ -213,7 +213,7 @@ Part of OpenSPP. See LICENSE file for full copyright and licensing details.
invisible="state != 'draft' or request_type_ref_id"
style="margin-left: 10px;"
class="oe_inline"
/>
/> -->
<button
name="open_applicant_form"
type="object"
Expand All @@ -233,79 +233,111 @@ Part of OpenSPP. See LICENSE file for full copyright and licensing details.
readonly="state != 'draft'"
/>
</group>
<button
name="create_request_detail"
type="object"
string="NEXT"
icon="fa-chevron-circle-right"
class="btn-primary"
invisible="request_type_ref_id or not id"
style="margin-left: 10px;"
/>
<button
name="create_request_detail_no_redirect"
type="object"
string="CREATE"
icon="fa-chevron-circle-right"
class="btn-primary"
invisible="request_type_ref_id or id"
style="margin-left: 10px;"
/>
<button
name="open_request_detail"
type="object"
string="NEXT"
icon="fa-chevron-circle-right"
class="btn-warning"
invisible="not request_type_ref_id"
style="margin-left: 10px;"
/>
<group colspan="4" col="4" string="Monitoring">
<field
name="assign_to_id"
string="Assigned To"
options="{'no_create': True,'no_open':True}"
readonly="1"
/>
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
force_save="1"
readonly="state != 'draft'"
/>
<field name="date_requested" readonly="1" />
<field
name="create_uid"
string="Requested By"
options="{'no_create': True,'no_open':True}"
readonly="1"
/>
<field name="validator_ids" readonly="1" colspan="4">
<tree>
<field name="stage_id" />
<field name="validator_id" />
<field name="date_validated" />
</tree>
</field>
<field name="date_validated" readonly="1" />
<field
name="last_validated_by_id"
options="{'no_create': True,'no_open':True}"
readonly="1"
<div class="o_footer_bg">
<button
name="create_request_detail"
type="object"
string="NEXT"
icon="fa-chevron-circle-right"
class="btn-primary"
invisible="request_type_ref_id or not id"
style="margin-left: 10px;"
/>
<field name="date_applied" readonly="1" />
<field
name="applied_by_id"
options="{'no_create': True,'no_open':True}"
readonly="1"
<button
name="create_request_detail_no_redirect"
type="object"
string="CREATE"
icon="fa-chevron-circle-right"
class="btn-primary"
invisible="request_type_ref_id or id"
style="margin-left: 10px;"
/>
<field name="date_rejected" readonly="1" />
<field
name="rejected_by_id"
options="{'no_create': True,'no_open':True}"
readonly="1"
<button
name="open_request_detail"
type="object"
string="NEXT"
icon="fa-chevron-circle-right"
class="btn-warning"
invisible="not request_type_ref_id"
style="margin-left: 10px;"
/>
</div>
<group colspan="4" col="4" string="Monitoring">
<group colspan="2">
<field
name="assign_to_id"
string="Assigned To"
options="{'no_create': True,'no_open':True}"
readonly="1"
/>
</group>
<group colspan="2">
<field name="date_requested" readonly="1" />
</group>
</group>
<group colspan="4" col="4">
<group colspan="2">
<field
name="create_uid"
string="Requested By"
options="{'no_create': True,'no_open':True}"
readonly="1"
/>
</group>
<group colspan="2">
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
force_save="1"
readonly="state != 'draft'"
/>
</group>
</group>
<field name="validator_ids" readonly="1" colspan="4" nolabel="1">
<tree>
<field name="stage_id" />
<field name="validator_id" />
<field name="date_validated" />
</tree>
</field>
<group colspan="4" col="4">
<group colspan="2">
<field name="date_validated" readonly="1" />
</group>
<group colspan="2">
<field
name="last_validated_by_id"
options="{'no_create': True,'no_open':True}"
readonly="1"
/>
</group>
</group>
<group colspan="4" col="4">
<group colspan="2">
<field name="date_applied" readonly="1" />
</group>
<group colspan="2">
<field
name="applied_by_id"
options="{'no_create': True,'no_open':True}"
readonly="1"
/>
</group>
</group>
<group colspan="4" col="4">
<group colspan="2">
<field name="date_rejected" readonly="1" />
</group>
<group colspan="2">
<field
name="rejected_by_id"
options="{'no_create': True,'no_open':True}"
readonly="1"
/>
</group>
</group>
<group colspan="4" col="4">
<field name="rejected_remarks" colspan="4" readonly="1" />
</group>
<field name="request_type_ref_id" invisible="1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,28 +167,61 @@
colspan="4"
invisible="state != 'draft'"
/> -->
<group colspan="4" col="4" string="">
<group colspan="6" col="6">
<field name="full_name" readonly="1" colspan="4" class="oe_read_only" />
<field
name="family_name"
readonly="state != 'draft'"
class="oe_edit_only"
colspan="4"
/>
<field name="given_name" readonly="state != 'draft'" class="oe_edit_only" />
<field name="addl_name" readonly="state != 'draft'" class="oe_edit_only" />
<field name="gender" readonly="state != 'draft'" />
<field
name="phone"
readonly="state != 'draft'"
widget="phone"
options="{'enable_sms': false}"
/>
<field name="uid_number" readonly="state != 'draft'" />
<field name="birth_place" readonly="state != 'draft'" />
<field name="birthdate_not_exact" readonly="state != 'draft'" />
<field name="birthdate" readonly="state != 'draft'" />
<field name="applicant_relation" readonly="state != 'draft'" />
</group>
<group colspan="6" col="6">
<group colspan="2">
<field
name="family_name"
readonly="state != 'draft'"
class="oe_edit_only"
/>
</group>
<group colspan="2">
<field
name="given_name"
readonly="state != 'draft'"
class="oe_edit_only"
/>
</group>
<group colspan="2">
<field
name="addl_name"
readonly="state != 'draft'"
class="oe_edit_only"
/>
</group>
</group>
<group colspan="6" col="6">
<group colspan="2">
<field name="gender" readonly="state != 'draft'" />
</group>
<group colspan="2">
<field
name="phone"
readonly="state != 'draft'"
widget="phone"
options="{'enable_sms': false}"
/>
</group>
<group colspan="2">
<field name="uid_number" readonly="state != 'draft'" />
</group>
</group>
<group colspan="6" col="6">
<field name="birth_place" readonly="state != 'draft'" colspan="6" />
</group>
<group colspan="6" col="6">
<group colspan="2">
<field name="birthdate_not_exact" readonly="state != 'draft'" />
</group>
<group colspan="2">
<field name="birthdate" readonly="state != 'draft'" />
</group>
<group colspan="2">
<field name="applicant_relation" readonly="state != 'draft'" />
</group>
</group>
</page>
<page string="Attachments" invisible="1">
Expand Down Expand Up @@ -270,30 +303,41 @@
</field>
</page>
<page string="Other Information">
<group colspan="6" col="6">
<group colspan="2">
<field
name="change_request_id"
string="Request No."
readonly="1"
options="{'no_open':True}"
/>
</group>
<group colspan="2">
<field
name="assign_to_id"
string="Assigned To"
options="{'no_open':True}"
readonly="1"
/>
</group>
<group colspan="2">
<field
name="applicant_phone"
string="Applicant's Phone #"
required="1"
widget="phone"
options="{'enable_sms': false}"
readonly="state != 'draft'"
/>
</group>
</group>
<group colspan="4" col="4">
<field
name="change_request_id"
string="Request No."
readonly="1"
options="{'no_open':True}"
/>
<field
name="assign_to_id"
string="Assigned To"
options="{'no_open':True}"
readonly="1"
/>
<field
name="applicant_phone"
string="Applicant's Phone #"
required="1"
widget="phone"
options="{'enable_sms': false}"
readonly="state != 'draft'"
colspan="4"
/>
<field name="last_validated_by_id" readonly="1" />
<field name="date_validated" readonly="1" />
<group colspan="2">
<field name="last_validated_by_id" readonly="1" />
</group>
<group colspan="2">
<field name="date_validated" readonly="1" />
</group>
</group>
</page>
</notebook>
Expand Down

0 comments on commit 4a5b45b

Please sign in to comment.