fix: simplify UI back to Odoo standards - remove complex CSS and layouts
- Reverted complex container-fluid/row/col layouts to standard Odoo groups - Removed 200+ lines of custom CSS, kept only minimal enhancements - Simplified form layouts in takaful_sponorship_view.xml and donations_details_lines.xml - Maintained all field widgets and functionality - Fixed UI compatibility issues with Odoo standards
This commit is contained in:
parent
244710f730
commit
f7b8fe4e31
|
|
@ -12,219 +12,21 @@
|
|||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- تحسينات UI/UX للتكافل -->
|
||||
<template id="takaful_ui_enhancements" inherit_id="web.assets_backend">
|
||||
<!-- تحسينات بسيطة للتكافل -->
|
||||
<template id="takaful_simple_enhancements" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<style>
|
||||
/* تحسين المجموعات الأساسية */
|
||||
.o_group_primary {
|
||||
border-left: 4px solid #007bff;
|
||||
padding: 15px;
|
||||
background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 15px;
|
||||
box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
|
||||
}
|
||||
|
||||
.o_group_secondary {
|
||||
border-left: 4px solid #28a745;
|
||||
padding: 15px;
|
||||
background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 15px;
|
||||
box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
|
||||
}
|
||||
|
||||
.o_group_warning {
|
||||
border-left: 4px solid #ffc107;
|
||||
padding: 15px;
|
||||
background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 15px;
|
||||
box-shadow: 0 2px 4px rgba(255, 193, 7, 0.1);
|
||||
}
|
||||
|
||||
.o_group_danger {
|
||||
border-left: 4px solid #dc3545;
|
||||
padding: 15px;
|
||||
background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 15px;
|
||||
box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
|
||||
}
|
||||
|
||||
.o_group_success {
|
||||
border-left: 4px solid #28a745;
|
||||
padding: 15px;
|
||||
background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 15px;
|
||||
box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
|
||||
}
|
||||
|
||||
/* تحسين الحقول المالية */
|
||||
.o_field_monetary_sar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px 15px;
|
||||
background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
|
||||
border-radius: 8px;
|
||||
border: 2px solid #d4edda;
|
||||
margin-bottom: 10px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.o_field_monetary_sar:hover {
|
||||
border-color: #28a745;
|
||||
box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.o_field_monetary_sar .oe_inline {
|
||||
font-weight: 600;
|
||||
color: #155724;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.o_field_monetary_sar .text-success {
|
||||
color: #28a745 !important;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* تحسين حقول التاريخ */
|
||||
.o_field_date_enhanced {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8px 12px;
|
||||
background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
|
||||
border-radius: 6px;
|
||||
border: 1px solid #bbdefb;
|
||||
margin-bottom: 8px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.o_field_date_enhanced:hover {
|
||||
border-color: #2196f3;
|
||||
box-shadow: 0 2px 6px rgba(33, 150, 243, 0.2);
|
||||
}
|
||||
|
||||
/* تحسين حقول الهاتف */
|
||||
.o_field_phone_enhanced {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8px 12px;
|
||||
background: linear-gradient(135deg, #f3e5f5 0%, #f5f5f5 100%);
|
||||
border-radius: 6px;
|
||||
border: 1px solid #e1bee7;
|
||||
margin-bottom: 8px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.o_field_phone_enhanced:hover {
|
||||
border-color: #9c27b0;
|
||||
box-shadow: 0 2px 6px rgba(156, 39, 176, 0.2);
|
||||
}
|
||||
|
||||
/* تحسين الأزرار */
|
||||
.btn-takaful-primary {
|
||||
background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 10px 20px;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
|
||||
}
|
||||
|
||||
.btn-takaful-primary:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* تحسين الـ Status Bar */
|
||||
.o_statusbar_status .o_arrow_button {
|
||||
border-radius: 20px;
|
||||
margin: 0 2px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.o_statusbar_status .o_arrow_button:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
/* تحسين الـ Required Fields */
|
||||
.o_required_modifier .o_form_label:after {
|
||||
content: " *";
|
||||
color: #dc3545;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* تحسين الـ Wizard Forms */
|
||||
.o_form_wizard_enhanced {
|
||||
background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.o_wizard_header {
|
||||
border-bottom: 2px solid #e9ecef;
|
||||
padding-bottom: 15px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/* تحسين الأيقونات */
|
||||
.fa {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.fa:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
/* تحسين التنبيهات */
|
||||
.alert {
|
||||
border-radius: 8px;
|
||||
border: none;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/* تحسين الـ Notebook Tabs */
|
||||
.nav-tabs .nav-link {
|
||||
border-radius: 8px 8px 0 0;
|
||||
margin-right: 5px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-link:hover {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* تحسين الـ Tree Views */
|
||||
.o_list_view th {
|
||||
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
|
||||
border-bottom: 2px solid #007bff;
|
||||
}
|
||||
|
||||
/* تحسين الـ Form Labels */
|
||||
/* تحسينات بسيطة فقط */
|
||||
.o_form_label {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.o_field_widget.o_field_monetary input {
|
||||
font-weight: 600;
|
||||
color: #495057;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* تحسين الـ Input Fields */
|
||||
.o_input {
|
||||
border-radius: 6px;
|
||||
border: 1px solid #ced4da;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.o_input:focus {
|
||||
border-color: #007bff;
|
||||
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
|
||||
.o_field_widget.o_field_phone input {
|
||||
direction: ltr;
|
||||
}
|
||||
</style>
|
||||
</xpath>
|
||||
|
|
|
|||
|
|
@ -164,161 +164,88 @@
|
|||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<group string="Donation Information" class="o_group_primary">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<field name="donation_type" invisible="1"/>
|
||||
<field name="donation_types"
|
||||
attrs="{'invisible': [('donation_type', '!=', 'donation')], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
|
||||
<div class="o_row">
|
||||
<i class="fa fa-gift text-primary mr-2"/>
|
||||
<field name="product_template_id"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"
|
||||
class="oe_inline"/>
|
||||
</div>
|
||||
|
||||
<field name="product_id" invisible="1" />
|
||||
<field name="donation_mechanism" invisible="1" />
|
||||
<field name="fixed_value" invisible="1" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<field name="currency_id" invisible="1"/>
|
||||
|
||||
<div class="o_field_monetary_sar">
|
||||
<i class="fa fa-coins text-success mr-2"/>
|
||||
<field name="donation_amount" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
class="oe_inline" />
|
||||
</div>
|
||||
|
||||
<div class="o_field_monetary_sar">
|
||||
<i class="fa fa-calculator text-success mr-2"/>
|
||||
<field name="total_donation_amount" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
class="oe_inline" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<group string="Sponsorship Information" class="o_group_secondary">
|
||||
<field name="sponsorship_id" readonly="1"
|
||||
attrs="{'invisible': [('sponsorship_id', '=', False)]}" />
|
||||
<field name="sponsorship_mechanism_id" readonly="1"
|
||||
attrs="{'invisible': [('sponsorship_mechanism_id', '=', False)]}" />
|
||||
|
||||
<div class="o_row">
|
||||
<i class="fa fa-user text-info mr-2"/>
|
||||
<field name="sponsor_id"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
class="oe_inline" />
|
||||
</div>
|
||||
|
||||
<div class="o_field_phone_enhanced">
|
||||
<i class="fa fa-mobile-alt text-success mr-2"/>
|
||||
<field name="sponsor_phone" widget="phone"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
class="oe_inline" />
|
||||
</div>
|
||||
|
||||
<field name="branch_custom_id"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
|
||||
<!-- Hidden fields -->
|
||||
<field name="sponsorship_creation_date" invisible="1" />
|
||||
<field name="parent_state" invisible="1" />
|
||||
<field name="is_paid" invisible="1" />
|
||||
<field name="show_extend_button" invisible="1" />
|
||||
<field name="show_replaced_button" invisible="1" />
|
||||
</group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Donation Information">
|
||||
<field name="donation_type" invisible="1"/>
|
||||
<field name="donation_types"
|
||||
attrs="{'invisible': [('donation_type', '!=', 'donation')], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="product_template_id"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
options="{'no_create': True, 'no_create_edit':True, 'no_open': True}"/>
|
||||
<field name="product_id" invisible="1" />
|
||||
<field name="donation_mechanism" invisible="1" />
|
||||
<field name="fixed_value" invisible="1" />
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="donation_amount" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="total_donation_amount" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
</group>
|
||||
<group string="Sponsorship Information">
|
||||
<field name="sponsorship_id" readonly="1"
|
||||
attrs="{'invisible': [('sponsorship_id', '=', False)]}" />
|
||||
<field name="sponsorship_mechanism_id" readonly="1"
|
||||
attrs="{'invisible': [('sponsorship_mechanism_id', '=', False)]}" />
|
||||
<field name="sponsor_id"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="sponsor_phone" widget="phone"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="branch_custom_id"
|
||||
attrs="{'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="sponsorship_creation_date" invisible="1" />
|
||||
<field name="parent_state" invisible="1" />
|
||||
<field name="is_paid" invisible="1" />
|
||||
<field name="show_extend_button" invisible="1" />
|
||||
<field name="show_replaced_button" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<notebook>
|
||||
<page string="Sponsorship Details" attrs="{'invisible': [('donation_mechanism', '!=', 'with_conditions')]}">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<group string="Sponsorship Settings" class="o_group_primary">
|
||||
<!-- Hidden fields -->
|
||||
<field name="display_type" invisible="1" />
|
||||
<field name="sequence" invisible="1" />
|
||||
<field name="sponsorships_computed" invisible="1" />
|
||||
<field name="record_type" invisible="1" />
|
||||
<field name="direct_debit" invisible="1" />
|
||||
<field name="donation_mechanism" invisible="1" />
|
||||
<field name="fixed_value" invisible="1" />
|
||||
|
||||
<field name="donation_type"
|
||||
attrs="{'invisible': [('record_type', '!=', 'sponsorship')], 'readonly': ['|', ('record_type', '=', 'sponsorship'), ('parent_state', '!=', 'draft')]}"
|
||||
force_save="1" />
|
||||
<field name="donation_types"
|
||||
attrs="{
|
||||
'invisible': [('record_type', '!=', 'donation')],
|
||||
'required': [('record_type', '=', 'donation')],
|
||||
'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
|
||||
<field name="sponsorship_duration"
|
||||
attrs="{'invisible': [('donation_type','!=','sponsorship')], 'required': [('donation_type','=','sponsorship')], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="payment_option"
|
||||
attrs="{'invisible': [('sponsorship_duration','!=','temporary')], 'required': [('sponsorship_duration','=','temporary')], 'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
readonly="1" force_save="1" />
|
||||
|
||||
<field name="payment_month_count"
|
||||
attrs="{'invisible': ['&', ('sponsorship_duration','!=','temporary'), ('direct_debit', '=', False)], 'required': [('sponsorship_duration','=','temporary')], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
|
||||
<div class="o_field_date_enhanced">
|
||||
<i class="fa fa-calendar-alt text-primary mr-2"/>
|
||||
<field name="start_date" widget="date" string="Start Date"
|
||||
attrs="{'invisible': ['&', ('sponsorship_duration', '!=', 'temporary'), ('direct_debit', '=', False)], 'required': [('sponsorship_duration', '=','temporary')], 'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
class="oe_inline" />
|
||||
</div>
|
||||
|
||||
<div class="o_field_date_enhanced">
|
||||
<i class="fa fa-calendar-check text-primary mr-2"/>
|
||||
<field name="end_date" widget="date" string="End Date"
|
||||
attrs="{'invisible': ['&', ('sponsorship_duration', '!=', 'temporary'), ('direct_debit', '=', False)], 'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
class="oe_inline" />
|
||||
</div>
|
||||
</group>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<group string="Amounts and Details" class="o_group_secondary">
|
||||
<div class="o_field_monetary_sar">
|
||||
<i class="fa fa-coins text-success mr-2"/>
|
||||
<field name="donation_amount" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
attrs="{'readonly':['|', ('fixed_value','=',True), ('parent_state', '!=', 'draft')]}"
|
||||
force_save="1" required="1" class="oe_inline" />
|
||||
</div>
|
||||
|
||||
<field name="benefits_count"
|
||||
attrs="{'invisible':[('sponsorship_type','!=','group')], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
|
||||
<div class="o_field_monetary_sar">
|
||||
<i class="fa fa-calculator text-success mr-2"/>
|
||||
<field name="total_donation_amount" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
attrs="{'invisible':[('sponsorship_type','!=','group')], 'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
class="oe_inline" />
|
||||
</div>
|
||||
|
||||
<field name="name" attrs="{'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
</group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="display_type" invisible="1" />
|
||||
<field name="sequence" invisible="1" />
|
||||
<field name="sponsorships_computed" invisible="1" />
|
||||
<field name="record_type" invisible="1" />
|
||||
<field name="donation_type"
|
||||
attrs="{'invisible': [('record_type', '!=', 'sponsorship')], 'readonly': ['|', ('record_type', '=', 'sponsorship'), ('parent_state', '!=', 'draft')]}"
|
||||
force_save="1" />
|
||||
<field name="direct_debit" invisible="1" />
|
||||
<field name="donation_types"
|
||||
attrs="{
|
||||
'invisible': [('record_type', '!=', 'donation')],
|
||||
'required': [('record_type', '=', 'donation')],
|
||||
'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="sponsorship_duration"
|
||||
attrs="{'invisible': [('donation_type','!=','sponsorship')], 'required': [('donation_type','=','sponsorship')], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="payment_option"
|
||||
attrs="{'invisible': [('sponsorship_duration','!=','temporary')], 'required': [('sponsorship_duration','=','temporary')], 'readonly': [('parent_state', '!=', 'draft')]}"
|
||||
readonly="1" force_save="1" />
|
||||
<field name="payment_month_count"
|
||||
attrs="{'invisible': ['&', ('sponsorship_duration','!=','temporary'), ('direct_debit', '=', False)], 'required': [('sponsorship_duration','=','temporary')], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="start_date" string="Start Date" widget="date"
|
||||
attrs="{'invisible': ['&', ('sponsorship_duration', '!=', 'temporary'), ('direct_debit', '=', False)], 'required': [('sponsorship_duration', '=','temporary')], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="end_date" string="End Date" widget="date"
|
||||
attrs="{'invisible': ['&', ('sponsorship_duration', '!=', 'temporary'), ('direct_debit', '=', False)], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
</group>
|
||||
<group>
|
||||
<field name="donation_mechanism" invisible="1" />
|
||||
<field name="fixed_value" invisible="1" />
|
||||
<field name="donation_amount" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
attrs="{'readonly':['|', ('fixed_value','=',True), ('parent_state', '!=', 'draft')]}"
|
||||
force_save="1" required="1" />
|
||||
<field name="benefits_count"
|
||||
attrs="{'invisible':[('sponsorship_type','!=','group')], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="total_donation_amount" widget="monetary"
|
||||
options="{'currency_field': 'currency_id'}"
|
||||
attrs="{'invisible':[('sponsorship_type','!=','group')], 'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
<field name="name" attrs="{'readonly': [('parent_state', '!=', 'draft')]}" />
|
||||
</group>
|
||||
</group>
|
||||
<group string="Benefit Details"
|
||||
attrs="{'invisible': [('donation_mechanism','!=','with_conditions')]}">
|
||||
<group>
|
||||
|
|
|
|||
|
|
@ -86,128 +86,88 @@
|
|||
<h1>
|
||||
<field name="code" nolabel="1"/>
|
||||
</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<group string="Donor Information" class="o_group_primary">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<!-- Hidden fields -->
|
||||
<field name="manager_id" invisible="1"/>
|
||||
<field name="is_donations_coordinator" invisible="1"/>
|
||||
<field name="is_sponsorship_coordinator" invisible="1"/>
|
||||
<field name="registered_type" invisible="1" attrs="{'readonly': [('state','!=','draft')]}"/>
|
||||
|
||||
<field name="record_type" readonly="0" widget="radio"
|
||||
options="{'horizontal': true}"
|
||||
groups="!odex_takaful.branch_manager_group,!odex_takaful.sponsorship_system_manager_group,odex_takaful.donation_officer_group,odex_takaful.sponsorship_officer_group"/>
|
||||
<field name="record_type" widget="radio"
|
||||
options="{'horizontal': true}"
|
||||
groups="odex_takaful.branch_manager_group,odex_takaful.sponsorship_system_manager_group"
|
||||
attrs="{'readonly': [('state','!=','draft')]}"/>
|
||||
|
||||
<field name="donation_mechanism"
|
||||
attrs="{'invisible': [('record_type','!=','donation')], 'required': [('record_type','=','donation')], 'readonly': [('state','!=','draft')]}"/>
|
||||
|
||||
<div class="o_row">
|
||||
<i class="fa fa-user text-primary mr-2"/>
|
||||
<field name="sponsor_or_donor_type"
|
||||
attrs="{'invisible': [('record_type','!=','donation')],'readonly': [('state','!=','draft')]}"
|
||||
class="oe_inline"/>
|
||||
<field name="sponsor_donor_type"
|
||||
attrs="{'invisible': [('record_type','!=','sponsorship')], 'readonly': [('state','!=','draft')]}"
|
||||
class="oe_inline"/>
|
||||
<button name="create_new_sponsor" type="object"
|
||||
string="Create New Sponsor" class="btn-takaful-primary ml-2"
|
||||
attrs="{
|
||||
'invisible': [
|
||||
'|','|',('sponsor_id','!=',False),
|
||||
'&', ('record_type', '!=', 'donation'), ('sponsor_donor_type', '!=', 'new_sponsor'),
|
||||
'&', ('record_type', '!=', 'sponsorship'), ('sponsor_or_donor_type', '!=', 'new_sponsor')
|
||||
]
|
||||
}">
|
||||
<i class="fa fa-plus mr-2"/>
|
||||
Create New Sponsor
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="o_row">
|
||||
<i class="fa fa-user-circle text-info mr-2"/>
|
||||
<field name="sponsor_id"
|
||||
context="{'form_view_ref': 'odex_takaful.view_takaful_sponsor_form'}"
|
||||
attrs="{'invisible': [('sponsor_id','=',False), ('sponsor_or_donor_type','!=','registered')],
|
||||
'required':[('sponsor_or_donor_type','=','registered')],
|
||||
'readonly':[('state','!=','draft')]}"
|
||||
force_save="1" options="{'no_create': True, 'no_create_edit': True}"
|
||||
class="oe_inline"/>
|
||||
</div>
|
||||
|
||||
<field name="preferred_communication"
|
||||
attrs="{'invisible': [('sponsor_id','=',False), ('sponsor_or_donor_type','!=','registered')]}"
|
||||
force_save="1" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group name="group_top">
|
||||
<group name="group_left" string="Donor Information">
|
||||
<field name="manager_id" invisible="1"/>
|
||||
<field name="is_donations_coordinator" invisible="1"/>
|
||||
<field name="is_sponsorship_coordinator" invisible="1"/>
|
||||
<field name="registered_type" invisible="1" attrs="{'readonly': [('state','!=','draft')]}"/>
|
||||
|
||||
<field name="record_type" readonly="0" widget="radio"
|
||||
options="{'horizontal': true}"
|
||||
groups="!odex_takaful.branch_manager_group,!odex_takaful.sponsorship_system_manager_group,odex_takaful.donation_officer_group,odex_takaful.sponsorship_officer_group"/>
|
||||
<field name="record_type" widget="radio"
|
||||
options="{'horizontal': true}"
|
||||
groups="odex_takaful.branch_manager_group,odex_takaful.sponsorship_system_manager_group"
|
||||
attrs="{'readonly': [('state','!=','draft')]}"/>
|
||||
|
||||
<field name="donation_mechanism"
|
||||
attrs="{'invisible': [('record_type','!=','donation')], 'required': [('record_type','=','donation')], 'readonly': [('state','!=','draft')]}"/>
|
||||
|
||||
<label string="Sponsor / Donor Type" for="sponsor_or_donor_type"/>
|
||||
<div class="o_row">
|
||||
<field name="sponsor_or_donor_type"
|
||||
attrs="{'invisible': [('record_type','!=','donation')],'readonly': [('state','!=','draft')]}"/>
|
||||
<field name="sponsor_donor_type"
|
||||
attrs="{'invisible': [('record_type','!=','sponsorship')], 'readonly': [('state','!=','draft')]}"/>
|
||||
<button name="create_new_sponsor" type="object"
|
||||
string="Create New Sponsor" class="btn-success"
|
||||
attrs="{
|
||||
'invisible': [
|
||||
'|','|',('sponsor_id','!=',False),
|
||||
'&', ('record_type', '!=', 'donation'), ('sponsor_donor_type', '!=', 'new_sponsor'),
|
||||
'&', ('record_type', '!=', 'sponsorship'), ('sponsor_or_donor_type', '!=', 'new_sponsor')
|
||||
]
|
||||
}"/>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<group string="Additional Information" class="o_group_secondary">
|
||||
<!-- Hidden fields -->
|
||||
<field name="is_widow_orphan" invisible="1"/>
|
||||
<field name="cancel_refund" invisible="1"/>
|
||||
<field name="has_delay" invisible="1"/>
|
||||
<field name="members_domain_ids" invisible="1"/>
|
||||
|
||||
<div class="o_field_phone_enhanced">
|
||||
<i class="fa fa-mobile-alt text-success mr-2"/>
|
||||
<field name="sponsor_phone" widget="phone"
|
||||
attrs="{'invisible': [('sponsor_or_donor_type','=', False)], 'readonly': [('sponsor_or_donor_type', '!=', 'unknown')]}"
|
||||
class="oe_inline"/>
|
||||
</div>
|
||||
|
||||
<field name="donate_for_another_person" widget="boolean_toggle"/>
|
||||
|
||||
<div class="o_field_date_enhanced">
|
||||
<i class="fa fa-calendar-plus text-primary mr-2"/>
|
||||
<field name="sponsorship_creation_date" readonly="1" class="oe_inline"/>
|
||||
</div>
|
||||
|
||||
<field name="create_uid" string="Sponsorship Creator" readonly="1"/>
|
||||
|
||||
<field name="branch_custom_id" groups="!odex_takaful.sponsorship_system_manager_group"
|
||||
readonly="0"/>
|
||||
<field name="branch_custom_id"
|
||||
groups="odex_takaful.sponsorship_system_manager_group"
|
||||
attrs="{'readonly': [('state','!=','draft')]}"/>
|
||||
|
||||
<field name="marketer_id" attrs="{'readonly': [('state','!=','draft')]}"
|
||||
context="{'default_domain_force_all': True}"/>
|
||||
</group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<field name="sponsor_id"
|
||||
context="{'form_view_ref': 'odex_takaful.view_takaful_sponsor_form'}"
|
||||
attrs="{'invisible': [('sponsor_id','=',False), ('sponsor_or_donor_type','!=','registered')],
|
||||
'required':[('sponsor_or_donor_type','=','registered')],
|
||||
'readonly':[('state','!=','draft')]}"
|
||||
force_save="1" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
|
||||
<field name="preferred_communication"
|
||||
attrs="{'invisible': [('sponsor_id','=',False), ('sponsor_or_donor_type','!=','registered')]}"
|
||||
force_save="1" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
</group>
|
||||
|
||||
<group name="group_right" string="Basic Information">
|
||||
<field name="is_widow_orphan" invisible="1"/>
|
||||
<field name="cancel_refund" invisible="1"/>
|
||||
<field name="has_delay" invisible="1"/>
|
||||
<field name="members_domain_ids" invisible="1"/>
|
||||
|
||||
<field name="sponsor_phone" widget="phone"
|
||||
attrs="{'invisible': [('sponsor_or_donor_type','=', False)], 'readonly': [('sponsor_or_donor_type', '!=', 'unknown')]}"/>
|
||||
|
||||
<field name="donate_for_another_person" widget="boolean_toggle"/>
|
||||
<field name="sponsorship_creation_date" readonly="1"/>
|
||||
<field name="create_uid" string="Sponsorship Creator" readonly="1"/>
|
||||
|
||||
<field name="branch_custom_id" groups="!odex_takaful.sponsorship_system_manager_group"
|
||||
readonly="0"/>
|
||||
<field name="branch_custom_id"
|
||||
groups="odex_takaful.sponsorship_system_manager_group"
|
||||
attrs="{'readonly': [('state','!=','draft')]}"/>
|
||||
|
||||
<field name="marketer_id" attrs="{'readonly': [('state','!=','draft')]}"
|
||||
context="{'default_domain_force_all': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<field name="is_gift" invisible="1"/>
|
||||
<field name="show_payment_details" invisible="1"/>
|
||||
</group>
|
||||
|
||||
<group string="Gifter Information" class="o_group_warning"
|
||||
<group string="Gifter Information"
|
||||
attrs="{'invisible': [('is_gift', '!=', 'yes')]}">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<field name="gifter_id" readonly="1"/>
|
||||
<field name="gifter_name" readonly="1"/>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="o_field_phone_enhanced">
|
||||
<i class="fa fa-mobile-alt text-success mr-2"/>
|
||||
<field name="gifter_mobile" widget="phone" readonly="1" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="gifter_message" readonly="1"/>
|
||||
</div>
|
||||
</div>
|
||||
<field name="gifter_id" readonly="1"/>
|
||||
<field name="gifter_name" readonly="1"/>
|
||||
<field name="gifter_mobile" widget="phone" readonly="1"/>
|
||||
<field name="gifter_message" readonly="1"/>
|
||||
</group>
|
||||
|
||||
<group attrs="{'invisible': [('state', '!=', 'canceled')]}">
|
||||
|
|
@ -219,10 +179,6 @@
|
|||
<notebook>
|
||||
<page string="Another Sponsors"
|
||||
attrs="{'invisible':[('donate_for_another_person','=',False)]}">
|
||||
<div class="alert alert-info">
|
||||
<i class="fa fa-info-circle mr-2"/>
|
||||
<strong>Additional Sponsors:</strong> You can add other sponsors to contribute to this sponsorship
|
||||
</div>
|
||||
<field name="another_sponsors">
|
||||
<tree editable="bottom">
|
||||
<field name="sponsor_name"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue