<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_battery_installation_form" model="ir.ui.view">
    <field name="name">sos_proposal_customer_requirement.form</field>
    <field name="model">sos_proposal_customer_requirement</field>
    <field name="arch" type="xml">
        <form string="Battery Installation">
            
            <sheet>
            <h2 style="text-align: center;text-transform: uppercase;text-shadow: 1px 1p 1px #140718;color: #65407c;padding:5px;">Customer Requirements</h2><hr></hr><br></br>  

            <group>
                <group>
                <field name="proposal_id"/>
                <field name="customer_name"/>
                <field name="products"/>
                <field name="cloud_subscription"/>
                <field name="internet_connectivity"/>
                <field name="specific_requirements"/>
                </group>
                 <group>
                  <field name="location"/>
                  <field name="installation_location"/>
                  <field name="direction"/>
                  <field name="warranty"/>
                  <field name="duct_type"/>
                  <field invisible="products != 'BHMS 12V'" name="communication_type"/>
                   <field invisible="products != 'BHMS 1.2V'" name="master_type"/>
                   <field invisible="products != 'BHMS 1.2V'" name="slave_type"/>
                   <field invisible="products != 'BHMS 1.2V'" name="ntc"/>
                    
                </group>
                </group>
                     <br></br>

    <h2 style="text-align: center;text-transform: uppercase;text-shadow: 1px 1p 1px #140718;color: #65407c;padding:5px;">Detailed Specifications</h2><hr></hr><br></br>  
   <group>
   <field name="type_of_source"/>
    <field name="number_of_ups" string="Number of UPS"/>
    <field name="no_of_electrical_panel"/>
    <field name="ups_line_ids">
        <tree editable="bottom">
        <field name="ups_index" column_invisible="1"/>
        <field name="name"/>
        <field name="battery_capacity_ah"/>
        <field name="ups_capacity_kva"/>
        <field name="number_of_strings_per_battery"/>
        <field name="number_of_batteries"/>
        <field name="total_batteries"/>
        </tree>
    </field>
    <field name="number_of_batteries"/>
              
          
                </group>
                 <br></br> <hr></hr>
                        <templates>
    <div class="row">
    <div class="col-md-6" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;background-color: #fff;border: solid 4px #9689c1;        padding-right: 0px;padding-left: 0px;">
       <table class="table">
     <tr><td colspan="2" class="table_custom_header">To Be Filled By <span style="font-size: 18px;padding: 0px; color: #ffcc00;">Sales Team</span></td></tr>

        <tr>
            <td style="padding: 8px;" class="column"><b>Submitted By</b>
                <button string="Approve" invisible="requirement_submitted_by_image" class="btn-primary custom_btn" type="object" name="action_sales_esign_btn"></button>
            </td>
            <td><field name="requirement_submitted_by_image" widget="image"/></td>
        </tr>
        <tr invisible="requirement_submitted_by_image == False">
            <td style="padding: 8px;" class="column"><b>Submitted On</b></td>
            <td><field name="requirement_submitted_by_approved_on" readonly="1"/></td>
        </tr>
        <tr invisible="requirement_submitted_by_image == False">
            <td style="padding: 8px;" class="column"><b>Submitted By</b></td>
            <td><field name="requirement_submitted_by_name" readonly="1"/></td>
        </tr>
    </table>
    </div>
 
     </div>


                            </templates>
            </sheet>
        </form>
    </field>
</record>

<record id="view_battery_installation_tree" model="ir.ui.view">
    <field name="name">sos_proposal_customer_requirement.tree</field>
    <field name="model">sos_proposal_customer_requirement</field>
    <field name="arch" type="xml">
        <tree>
             <field name="proposal_id"/>
            <field name="customer_name"/>
            <field name="location"/>
            <field name="products"/>
            <field name="requirement_submitted_by_name" string="Requirement Submitted By" widget="many2one_avatar_user"/>
            <field name="boq_submitted_by_name" string="BOQ Submitted By" widget="many2one_avatar_user"/>
            <field name="acc_approved_by_name" string="Accounts Costing By" widget="many2one_avatar_user"/>

        </tree>
    </field>
</record>
<record id="action_proposal_requirement" model="ir.actions.act_window">
    <field name="name">Customer Requirements</field>
    <field name="res_model">sos_proposal_customer_requirement</field>
    <field name="view_mode">tree,form</field>
</record>
<menuitem id="menu_proposal_customer_requirement" name="Proposal Requirement" parent="sos_proposal_system" action="action_proposal_requirement"/>

</odoo>
