odex25_standard/odex25_benefit/odex_benefit/views/service_request.xml

555 lines
38 KiB
XML

<odoo>
<data>
<!--Service Request-->
<record id="service_request_form" model="ir.ui.view">
<field name="name">service.request.form</field>
<field name="model">service.request</field>
<field name="arch" type="xml">
<form string="Service Request">
<header>
<button name="action_send_to_researcher" type="object" states="draft,waiting_family"
string="Send" class="oe_highlight"/>
<button name="action_researcher_send_request" type="object" states="researcher"
string="Researcher Approval" class="oe_highlight"
groups="odex_benefit.group_benefit_researcher"
/>
<button name="action_return_to_family" type="object" states="researcher"
string="Return to Family" class="btn btn-warning"
groups="odex_benefit.group_benefit_researcher"
/>
<button name="action_refuse" type="object"
string="Refuse" class="btn btn-danger"
states="researcher" groups="odex_benefit.group_benefit_researcher"/>
<button name="action_operations_chief_approve" type="object"
string="Operations Manager Approval" class="oe_highlight"
confirm="Are you sure you want to first approve ?"
states="waiting_approve"
groups="odex_benefit.group_benefit_woman_commitee"
/>
<button name="action_first_refuse" type="object"
string="Return the request to the specialist" class="btn btn-warning"
states="waiting_approve"
groups="odex_benefit.group_benefit_woman_commitee"/>
<button name="action_refuse" type="object"
string="Refuse" class="btn btn-danger"
states="waiting_approve"
groups="odex_benefit.group_benefit_woman_commitee"
/>
<button name="action_branch_manager_approve" type="object"
string="Request Second Approve" class="oe_highlight"
confirm="Are you sure you want to second approve ?"
states="first_approve"
groups="odex_benefit.group_benefit_branch_manager"/>
<button name="action_first_refuse" type="object"
string="Return the request to the specialist" class="btn btn-warning"
states="first_approve"
groups="odex_benefit.group_benefit_branch_manager"/>
<button name="action_refuse" type="object"
string="Refuse" class="btn btn-danger"
states="first_approve"
groups="odex_benefit.group_benefit_branch_manager"
/>
<button name="action_family_services_manager_approve" type="object"
string="Family Services Manager Approval" class="oe_highlight"
states="family_services_manager"
groups="odex_benefit.group_family_services_manager"
/>
<button name="action_first_refuse" type="object"
string="Return the request to the specialist" class="btn btn-warning"
states="family_services_manager"
groups="odex_benefit.group_family_services_manager"
/>
<button name="action_refuse" type="object"
string="Refuse" class="btn btn-danger"
states="family_services_manager"
groups="odex_benefit.group_family_services_manager"
/>
<button name="action_legal_department_approve" type="object"
string="Legal Department Approval" class="oe_highlight"
states="legal_department"
groups="odex_benefit.group_service_legal_department"
/>
<button name="action_first_refuse" type="object"
string="Return the request to the specialist" class="btn btn-warning"
states="legal_department"
groups="odex_benefit.group_service_legal_department"
/>
<button name="action_refuse" type="object"
string="Refuse" class="btn btn-danger"
states="legal_department"
groups="odex_benefit.group_service_legal_department"
/>
<button name="action_projects_department_approve" type="object"
string="Projects Department Approval" class="oe_highlight"
states="projects_department"
groups="odex_benefit.group_service_projects_department"
/>
<button name="action_first_refuse" type="object"
string="Return the request to the specialist" class="btn btn-warning"
states="projects_department"
groups="odex_benefit.group_service_projects_department"
/>
<button name="action_refuse" type="object"
string="Refuse" class="btn btn-danger"
states="projects_department"
groups="odex_benefit.group_service_projects_department"
/>
<button name="action_accounting_approve" type="object" invisible="1"
string="Accounting Approve" class="oe_highlight"
confirm="Are you sure you want to approve ?"
states="accounting_approve"/>
<button name="action_first_refuse" type="object"
string="Return the request to the specialist" class="btn btn-warning"
states="accounting_approve"
/>
<button name="action_refuse" type="object"
string="Refuse" class="btn btn-danger"
states="accounting_approve"
/>
<button name="action_processed" type="object"
string="Processed" class="oe_highlight"
states="return_to_bank"
groups="odex_benefit.group_benefit_researcher"
/>
<button name="action_supplier_approve" type="object"
string="Send Request To Supplier" class="oe_highlight"
confirm="Are you sure you want to approve ?"
states="approval_of_beneficiary_services"
groups="odex_benefit.group_benefit_researcher"/>
<button name="action_first_refuse" type="object"
string="Return the request to the specialist" class="btn btn-warning"
states="approval_of_beneficiary_services"
groups="odex_benefit.group_benefit_researcher"/>
<button name="action_refuse" type="object"
string="Refuse" class="btn btn-danger"
states="approval_of_beneficiary_services"
groups="odex_benefit.group_benefit_researcher"
/>
<button name="action_request_done" type="object"
string="Family Received" class="oe_highlight"
states="send_request_to_supplier"
groups="odex_benefit.group_family_service_receipt"
/>
<button name="action_refuse" type="object"
string="Refuse" class="btn btn-danger"
states="send_request_to_supplier"
groups="odex_benefit.group_family_service_receipt"
/>
<button name="action_first_refuse" type="object"
string="Return the request to the specialist" class="btn btn-warning"
states="refused"
groups="odex_benefit.group_benefit_researcher"
/>
<button name="action_beneficiary_manager_approve" type="object"
string="Beneficiary Approve" class="oe_highlight"
confirm="Are you sure you want to approve ?"
states="gm_assistant"
groups="odex_benefit.group_benefit_branch_manager,odex_benefit.group_benefit_manager"/>
<button name="action_first_refuse" type="object"
string="Return the request to the specialist" class="btn btn-warning"
states="gm_assistant"
groups="odex_benefit.group_benefit_branch_manager,odex_benefit.group_benefit_manager"
/>
<button name="action_refuse" type="object"
string="Refuse" class="btn btn-danger"
states="gm_assistant"
groups="odex_benefit.group_benefit_branch_manager,odex_benefit.group_benefit_manager"
/>
<field name="state" widget="statusbar"
statusbar_visible="draft,researcher,waiting_approve,first_approve,accounting_approve,send_request_to_supplier,family_received_device,refused"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_open_payment_orders"
type="object"
class="oe_stat_button"
icon="fa-money"
attrs="{'invisible': [('payment_order_count', '=', 0)]}">
<field name="payment_order_count" widget="statinfo" string="Payment Orders"/>
</button>
<button name="action_open_related_move_records"
class="oe_stat_button"
icon="fa-file-text-o"
type="object" attrs="{'invisible': [('total_moves', '=', 0)]}">
<field name="total_moves" widget="statinfo" string="Total Moves"/>
</button>
</div>
<field name="payment_order_ids" invisible="1"/>
<field name="is_payment_order_done" invisible="1"/>
<field name="payment_order_state" invisible="1"/>
<widget name="web_ribbon" title="Payment Done" bg_color="bg-success"
attrs="{'invisible': [('payment_order_state', '!=', 'done')]}"/>
<widget name="web_ribbon" title="Payment Waiting" bg_color="bg-warning"
attrs="{'invisible': [('payment_order_state', '!=', 'waiting')]}"/>
<group>
<div class="oe_title">
<h1>
<field name="name" readonly="1"/>
</h1>
</div>
<group>
<field name="date"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"
required="1"/>
<field name="benefit_type" invisible="1"/>
<field name="family_id"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"
required="1"/>
<field name="family_category" force_save="1"/>
<field name="researcher_id" force_save="1"/>
<field name="benefit_member_count" force_save="1"/>
<field name="service_benefit_count"
attrs="{'invisible':['|',('service_type','!=','eid_gift'),('benefit_type','!=','family')]}"/>
<field name="branch_custom_id" force_save="1"/>
<field name="member_domain_ids" invisible="1" widget="many2many_tags"/>
<field name="member_id" domain="[('id', 'in', member_domain_ids)]"
attrs="{'invisible':[('benefit_type','!=','member')],'readonly':[('state','not in',['draft','researcher','waiting_approve'])],'required':[('benefit_type','=','member')]}"/>
<field name="is_orphan" attrs="{'invisible':[('service_type', '!=', 'marriage')]}"/>
<field name="member_age" attrs="{'invisible':[('benefit_type','!=','member')]}"/>
<field name="member_payroll" attrs="{'invisible':[('service_type','!=','marriage')]}"/>
<field name="account_id" invisible="1"/>
<field name="device_account_id" invisible="1"/>
<field name="accountant_id"
attrs="{'invisible':[('state','in',['draft','researcher','waiting_approve','first_approve','gm_assistant'])]}"/>
<field name="payment_order_id" readonly="1"
attrs="{'invisible':[('payment_order_id','=',False)]}"
/>
<field name="vendor_bill" invisible="1"/>
<field name="is_service_producer" invisible="1"/>
<field name="service_producer_id" force_save="1"
attrs="{'invisible':[('payment_method','!=','invoice')],'readonly':[('state','in',['family_received_device','send_request_to_supplier'])],'required': [('payment_method','=','invoice'), ('state','=','accounting_approve')]}"/>
<field name="currency_id" groups="base.group_multi_currency"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group>
<field name="available_service_cats" invisible="1"/>
<field name="max_limit_period" invisible="1"/>
<field name="payment_method" force_save="1" invisible="1"/>
<field name="service_cat"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"
domain="[('id','in',available_service_cats)]" required="1"/>
<field name="is_in_kind" widget="boolean_toggle" invisible="1"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"/>
<field name="service_qty"
attrs="{'invisible':[('is_in_kind','=',False)]}"/>
<label for="start" string="Period"
attrs="{'invisible': ['&amp;', ('service_type', '!=', 'rent'), ('max_limit_period', '!=', 'month')]}"/>
<div name="dates" class="o_row"
attrs="{'invisible': ['&amp;', ('service_type', '!=', 'rent'), ('max_limit_period', '!=', 'month')]}">
<field name="start"
attrs="{'required': ['|',('service_type', '=', 'rent'),('max_limit_period', '=', 'month')],'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"/>
<i class="fa fa-long-arrow-right mx-2 oe_edit_only"
aria-label="Arrow icon" title="Arrow"/>
<i class="fa fa-long-arrow-right mx-2 oe_read_only"
aria-label="Arrow icon" title="Arrow"
attrs="{'invisible': [('start', '=', False), ('end', '=', False)]}"/>
<field name="end"
attrs="{'required': ['|',('service_type', '=', 'rent'),('max_limit_period', '=', 'month')],'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"/>
</div>
<field name="marriage_contract_date"
attrs="{'invisible':[('service_type', '!=', 'marriage')],'required':[('service_type','=','marriage')]}"/>
<field name="service_approval_date"
attrs="{'invisible':[('service_approval_date','=',False)]}"/>
<field name="need_status"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"/>
<field name="main_service_category"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"
invisible="1"/>
<field name="sub_service_category"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"
invisible="1"/>
<field name="show_car_remaining_amount" invisible="1"/>
<field name="car_price"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])],'invisible': [('service_type', '!=', 'buy_car')]}"/>
<field name="requested_service_amount" attrs="{'readonly': [
'|',
'&amp;',
('state', 'not in', ['draft', 'researcher', 'waiting_approve', 'first_approve', 'gm_assistant', 'accounting_approve']),
('service_type', 'in', ['marriage', 'eid_gift', 'winter_clothing', 'ramadan_basket']),
('service_type', 'in', ['electrical_devices', 'home_furnishing'])
]}" force_save="1" required="1"/>
<field name="car_remaining_amount" readonly="1"
attrs="{'invisible': [('show_car_remaining_amount', '=', False)]}"/>
<field name="service_max_amount" force_save="1" readonly="1"/>
<field name="exception"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"/>
<field name="exception_attach" attrs="{'invisible': [('exception', '=', False)]}"
widget="many2many_attachment_preview"/>
<field name="amount_for_buy_home_for_member_count"
attrs="{'invisible':[('service_type','!=','buy_home')]}"/>
<field name="home_age" attrs="{'invisible':[('service_type','!=','buy_home')]}"/>
<field name="aid_amount" invisible="1"/>
<field name="service_attach" invisible="1" widget="many2many_attachment_preview"/>
<field name="has_marriage_course"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])],'invisible':[('service_type','!=','marriage')],'required':[('service_type','=','marriage')]}"/>
<field name="service_type" invisible="1"/>
<field name="refuse_reason_id" attrs="{'invisible': [('refuse_reason_id', '=', False)]}"
readonly="1"/>
<field name="refuse_reason" attrs="{'invisible': [('refuse_reason', '=', False)]}"
readonly="1"/>
<field name="required_attach" invisible="1"/>
<field name="is_seasonal" invisible="1"/>
<field name="agree_terms" invisible="1" widget="boolean_toggle"/>
</group>
</group>
<group>
<field name="description"
attrs="{'readonly':[('state','not in',['draft','researcher','waiting_approve'])]}"/>
<field name="return_reason_id" attrs="{'invisible': [('return_reason_id', '=', False)]}"
readonly="1"/>
<field name="return_reason" attrs="{'invisible': [('return_reason', '=', False)]}"
readonly="1"/>
<field name="specialist_note" attrs="{'invisible': [('return_reason', '=', False)]}"/>
</group>
<notebook>
<page string="Services Attachments Settings"
attrs="{'invisible':[('required_attach','=',False)]}">
<field name="attachment_lines" widget="one2many_list">
<tree editable="bottom" delete="0">
<field name="name"/>
<field name="service_attach" widget="many2many_attachment_preview"/>
<field name="write_uid"/>
<field name="write_date"/>
<field name="notes"/>
<field name="service_type" invisible="1"/>
<field name="state" invisible="1"/>
</tree>
</field>
</page>
<page string="Rent Information"
attrs="{'invisible':[('service_type', '!=', 'rent'),'|',('service_type', '!=', 'alternative_housing'),('providing_alternative_housing_based_rent','=',False)]}">
<form>
<sheet>
<group>
<group attrs="{'invisible':[('service_type', '=', 'alternative_housing')]}">
<separator string="Rent Contract Information" colspan="2"/>
<br/>
<field name="rent_payment_date_exception" widget="boolean_toggle"/>
<field name="rent_payment_date"
attrs="{'required':[('service_type','=','rent')]}"/>
<!--Family Rent-->
<field name="rent_contract_number"
force_save="1"/>
<field name="rent_start_date"
force_save="1"/>
<field name="rent_end_date"
force_save="1"/>
<field name="rent_amount"
force_save="1"/>
<field name="rent_amount_payment"
force_save="1"/>
<field name="payment_type"
force_save="1"/>
<field name="rent_attachment" widget="many2many_attachment_preview"
force_save="1"/>
</group>
<group attrs="{'invisible':[('benefit_type','!=','family')]}">
<separator string="Rent Amounts" colspan="2"/>
<br/>
<field name="estimated_rent_amount"/>
<field name="estimated_rent_amount_payment"/>
<field name="added_amount_if_mother_dead"
attrs="{'invisible':[('service_type','=','alternative_housing')]}"/>
</group>
</group>
</sheet>
</form>
</page>
<page string="Maintenance Service"
attrs="{'invisible':[('service_type', '!=', 'home_maintenance')]}">
<field name="maintenance_items_ids" widget="one2many_list">
<tree editable="bottom">
<field name="maintenance_items_id"/>
</tree>
</field>
</page>
<page string="Alternative Housing Service"
attrs="{'invisible':[('service_type', '!=', 'alternative_housing')]}">
<group>
<field name="providing_alternative_housing_based_rent"/>
<field name="rent_for_alternative_housing"/>
</group>
</page>
<page string="Electrical Devices Service"
attrs="{'invisible':[('service_type', '!=', 'electrical_devices')]}">
<group>
<field name="device_id"
attrs="{'required':[('service_type', '=', 'electrical_devices')]}"/>
<field name="requested_quantity"
attrs="{'required':[('service_type', '=', 'electrical_devices')]}"/>
<field name="exception_or_steal" widget="boolean_toggle"/>
<field name="exception_or_steal_attach" widget="many2many_attachment_preview"
attrs="{'invisible':[('exception_or_steal', '=', False)]}"/>
</group>
</page>
<page string="Home Furnishing Service"
attrs="{'invisible':[('service_type', '!=', 'home_furnishing')]}">
<group>
<field name="home_furnishing_exception"/>
</group>
<field name="furnishing_items_ids" widget="one2many_list">
<tree editable="bottom">
<field name="home_furnishing_items"/>
<field name="furnishing_cost"/>
<field name="price_first"/>
<field name="price_first_attach" widget="many2many_attachment_preview"/>
<field name="price_second"/>
<field name="price_second_attach" widget="many2many_attachment_preview"/>
</tree>
</field>
</page>
<page string="Eligibility Criteria">
<group>
<field name="service_conditions"/>
</group>
</page>
<page string="Car Information" attrs="{'invisible':[('service_type', '!=', 'buy_car')]}">
<group>
<group>
<field name="is_driver_family_member" widget="boolean_toggle"/>
<field name="driver_name"
attrs="{'invisible': [('is_driver_family_member', '=', True)], 'required': [('service_type', '=', 'buy_car'),('is_driver_family_member', '=', False)]}"/>
<field name="car_owner_id"
attrs="{'invisible': [('is_driver_family_member', '=', False)], 'required': [('service_type', '=', 'buy_car'),('is_driver_family_member', '=', True)]}"/>
<field name="car_name"/>
<field name="car_model_id"/>
</group>
<group>
<field name="application_form" widget="many2many_attachment_preview"/>
<field name="driving_license" widget="many2many_attachment_preview"/>
<field name="owner_identity" widget="many2many_attachment_preview"/>
</group>
</group>
</page>
<page string="Researcher Opinion">
<group>
<field name="researcher_opinion" nolabel="1"
placeholder="Please write the specialist opinion here..."
/>
</group>
</page>
<page string="Related Information">
<group>
<field name="related_information_html" nolabel="1" readonly="1"/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="activity_ids"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record model="ir.ui.view" id="service_request_tree">
<field name="name">service.request.tree</field>
<field name="model">service.request</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="date"/>
<field name="create_uid" string="Request Creator"/>
<field name="family_id"/>
<field name="branch_custom_id"/>
<field name="researcher_id"/>
<field name="need_status"/>
<field name="main_service_category" invisible="1"/>
<field name="sub_service_category" invisible="1"/>
<field name="service_cat"/>
<field name="requested_service_amount"/>
<field name="accountant_id" optional="hide"/>
<field name="payment_order_id" invisible="1"/>
<field name="vendor_bill" invisible="1"/>
<field name="state" widget="badge" decoration-success="state in ['gm_assistant']"
decoration-muted="state == 'draft'"
decoration-danger="state in ['refused']"
decoration-info="state in ['first_approve','waiting_approve']"
decoration-warning="state in ['researcher']"/>
<field name="payment_order_state"
widget="badge"
decoration-info="payment_order_state == 'none'"
decoration-warning="payment_order_state == 'waiting'"
decoration-success="payment_order_state == 'done'"
/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="service_request_search">
<field name="name">service.request.search</field>
<field name="model">service.request</field>
<field name="arch" type="xml">
<search>
<group string="Group By">
<filter string="Branch" name="branch_custom_id" context="{'group_by': 'branch_custom_id'}"/>
<filter string="Main Service" name="main_service_category"
context="{'group_by': 'main_service_category'}"/>
<filter string="Sub Service Category" name="sub_service_category"
context="{'group_by': 'sub_service_category'}"/>
<filter string="Service Cat" name="service_cat" context="{'group_by': 'service_cat'}"/>
</group>
<separator/>
<filter string="Draft" name="draft" domain="[('state','=','draft')]"/>
<separator/>
<separator/>
<filter string="Waiting for Operation Manager" name="waiting_approve"
domain="[('state', '=', 'waiting_approve')]"/>
<separator/>
<separator/>
<filter string="Waiting for Branch Manager" name="first_approve"
domain="[('state', '=', 'first_approve')]"/>
<separator/>
<separator/>
<filter string="Waiting Assistant General Manager" name="gm_assistant"
domain="[('state', '=', 'gm_assistant')]"/>
<separator/>
<separator/>
<filter string="Accounting Approve" name="accounting_approve"
domain="[('state', '=', 'accounting_approve')]"/>
<separator/>
<separator/>
<filter string="Refused" name="refused" domain="[('state', '=', 'refused')]"/>
<separator/>
<separator/>
<filter string="Payment Order Done" name="payment_order_done"
domain="[('payment_order_id', '!=', False)]"/>
<separator/>
<separator/>
<filter string="Need Payment Order" name="payment_order_done"
domain="[('payment_order_id', '=', False),('state','=','accounting_approve')]"/>
<separator/>
<separator/>
<filter string="Need Vendor Bill" name="need_vendor_bill"
domain="[('vendor_bill', '=', False),('state','=','family_received_device')]"/>
<separator/>
<separator/>
<filter string="Vendor Bill Done" name="need_vendor_bill"
domain="[('vendor_bill', '!=', False),('state','=','family_received_device')]"/>
<separator/>
<separator/>
<filter string="Send Request To Supplier" name="send_request_to_supplier"
domain="[('state','=','send_request_to_supplier')]"/>
<separator/>
<separator/>
<filter string="Family Received Device" name="family_received_device"
domain="[('state','=','family_received_device')]"/>
<separator/>
<searchpanel>
<field name="state" string="State" enable_counters="1"/>
<field name="service_cat" string="Categories" enable_counters="1"/>
</searchpanel>
</search>
</field>
</record>
</data>
</odoo>