<?xml version="1.0" encoding="UTF-8"?>
<odoo>


 <record id="action_sos_deliverables_boq_form_list" model="ir.actions.act_window">
    <field name="name">Deliverables / BOQ</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">sos_deliverables_boq</field>
    <field name="view_mode">tree,form,kanban</field>

</record>
<record id="sos_deliverables_boq_view_panel" model="ir.ui.view">
<field name="name">sos_deliverables_boq.search</field>
<field name="model">sos_deliverables_boq</field>
<field name="arch" type="xml">
<search position="inside">

 <field name="sales_id" string="Sales Order No"/>
</search>

</field>
</record>
    <record id="sos_deliverables_boq_view_tree" model="ir.ui.view">
        <field name="name">sos_deliverables_boq.view.tree</field>
        <field name="model">sos_deliverables_boq</field>
        <field name="arch" type="xml">
            <tree>
            <field name="sales_id"/>
                             <field name="customer_name"/>
                 <field name="customer_po_no"/>

                 <field name="lead_time"/>

  <field name="write_uid" string="Last Edited By" optional="hide"/>
                <field name="write_date" string="Last Edited On" optional="hide"/>
            </tree>
        </field>
        
    </record>
       <record id="sos_deliverables_boq_form_view" model="ir.ui.view">
      <field name="name">Form</field>
        <field name="model">sos_deliverables_boq</field>
        <field name="arch" type="xml">
<form string="Model Form">
        <header>
        <button class="btn btn-primary" type="object"
                            name="action_print_labels_btn"><i class="fa fa-print"></i> Print Labels</button>
                    

        <button name="action_report_boq" string="Report"
                type="object" class="btn-primary"/>        
                </header>
                    <sheet>
 
<h2 style="text-align: center;text-transform: uppercase;text-shadow: 1px 1p 1px #140718;color: #65407c;padding:5px;">Deliverables List / BOQ</h2><hr></hr><br></br>  


                        <group>
                         <group>
            <field name="sales_id"/>
           
               <field name="fg_name"/>
                 <field name="customer_name"/>
                 <field name="customer_location"/>
                 <field name="customer_po_no"/>
               <field name="customer_po_date"/>
    
                </group>
               <group>
               
               <field name="lead_time"/>
               <field name="quantity"/>
               <field name="show_ev_fields" invisible="1"/> 
               <field name="master_quantity" invisible="show_ev_fields == False"/>
               <field name="slave_quantity" invisible="show_ev_fields == False"/>
               <field name="batter_or_cells"/>
                   </group>
                        </group>
                     
                        

<notebook>
<page string="Finished Goods">
<field name="line_ids_fg">
<tree editable="bottom">
<field name="component_id"/>
<field name="add_production_cost" widget="boolean_toggle"/>
<field name="is_spare" widget="boolean_toggle"/>
<field name="uom"/>
<field name="singet_set_qty"/>
<field name="total_set"/>
<field name="quantity"/>
</tree>
</field>
</page>
<page string="Semi Finished Goods">
<field name="line_ids_sfg">
<tree editable="bottom">
<field name="component_id"/>
<field name="add_production_cost" widget="boolean_toggle"/>
<field name="is_spare" widget="boolean_toggle"/>
<field name="uom"/>
<field name="singet_set_qty"/>
<field name="total_set"/>
<field name="quantity"/>
</tree>
</field>
</page>
<page string="Materials">
<field name="line_ids_material">
<tree editable="bottom">
<field name="component_id"/>
<field name="display_name"/>
<field name="add_production_cost" widget="boolean_toggle"/>
<field name="is_spare" widget="boolean_toggle"/>

<field name="uom"/>
<field name="singet_set_qty"/>
<field name="total_set"/>
<field name="quantity"/>
</tree>
</field>
</page>
<page string="Installation Kit">
<field name="line_ids_installation_kit">
<tree editable="bottom">
<field name="component_id"/>
<field name="display_name"/>
<field name="uom"/>
<field name="singet_set_qty"/>
<field name="total_set"/>
<field name="quantity"/>
</tree>
</field>
</page>
<page string="Miscellaneous">
<field name="line_ids_miscellaneous">
<tree editable="bottom">
<field name="name"/>
<field name="cost"/>
<field name="quantity"/>
<field name="total_price"/>
</tree>
</field>
</page>
<page string="Feasibility Review">
        <templates>
      <div class="row" style="margin-top:15px">
  <div class="col-4"> <table  class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;width:100%;color: #000; background-color: #fff; border: solid 4px #9689c1;">
        <tr style="border-bottom: solid 1px #ccc;">
<td colspan="2" class="column" style="background-color: #9689c1;color: #fff;">
    To Be Filled By <span style="font-size: 18px;padding: 0px; color: #ffcc00;">SCG</span> Team
</td>        </tr>
        <tr>
           <td class="column">Comments</td> <td><field name="scg_comments"/></td>
 
        </tr>
        <tr>
            <td class="column">Authorised Signatory <button string="Approve" invisible="scg_reviewed_by_image" class="btn-primary custom_btn" type="object" name="action_scg_esign_btn"></button></td>
            <td><field name="scg_reviewed_by_image" widget="image"/></td>
        </tr>
         <tr invisible="scg_reviewed_by_image == False">
            <td style="padding: 8px;" class="column"><b>Approved On</b></td>
            <td><field name="scg_reviewed_on" readonly="1"/></td>
        </tr>
        <tr invisible="scg_reviewed_by_image == False">
            <td style="padding: 8px;" class="column"><b>Approved By</b></td>
            <td><field name="scg_reviewed_by" readonly="1"/></td>
        </tr>
    </table></div>
  
  <div class="col-4"><table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;width:100%;color: #000; background-color: #fff; border: solid 4px #9689c1;">
        <tr style="border-bottom: solid 1px #ccc;">
        <td colspan="2" class="column" style="background-color: #9689c1;color: #fff;">
    To Be Filled By <span style="font-size: 18px;padding: 0px; color: #ffcc00;">R&amp;D</span> Team
</td>
        </tr>
        <tr>
           <td class="column">Comments</td> <td><field name="rd_comments"/></td>
 
        </tr>
        <tr>
            <td class="column">Authorised Signatory <button string="Approve" invisible="rd_reviewed_by_image" class="btn-primary custom_btn" type="object" name="action_rd_esign_btn"></button></td>
            <td><field name="rd_reviewed_by_image" widget="image"/></td>
        </tr>
         <tr invisible="rd_reviewed_by_image == False">
            <td style="padding: 8px;" class="column"><b>Approved On</b></td>
            <td><field name="rd_reviewed_on" readonly="1"/></td>
        </tr>
        <tr invisible="rd_reviewed_by_image == False">
            <td style="padding: 8px;" class="column"><b>Approved By</b></td>
            <td><field name="rd_reviewed_by" readonly="1"/></td>
        </tr>
    </table></div>
     <div class="col-4"> <table  class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;width:100%;color: #000; background-color: #fff; border: solid 4px #9689c1;">
        <tr style="border-bottom: solid 1px #ccc;">
<td colspan="2" class="column" style="background-color: #9689c1;color: #fff;">
    To Be Filled By <span style="font-size: 18px;padding: 0px; color: #ffcc00;">PRODUCTION</span> Team
</td>
        </tr>
        <tr>
           <td class="column">Comments</td> <td><field name="production_comments"/></td>
 
        </tr>
        <tr>
            <td class="column">Authorised Signatory <button string="Approve" invisible="production_reviewed_by_image" class="btn-primary custom_btn" type="object" name="action_production_esign_btn"></button></td>
            <td><field name="production_reviewed_by_image" widget="image"/></td>
        </tr>
         <tr invisible="production_reviewed_by_image == False">
            <td style="padding: 8px;" class="column"><b>Approved On</b></td>
            <td><field name="production_reviewed_on" readonly="1"/></td>
        </tr>
        <tr invisible="production_reviewed_by_image == False">
            <td style="padding: 8px;" class="column"><b>Approved By</b></td>
            <td><field name="production_reviewed_by" readonly="1"/></td>
        </tr>
    </table></div>
  
  </div>
    <div class="row" style="margin-top:15px">
 
  <div class="col-4"><table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;width:100%;color: #000; background-color: #fff; border: solid 4px #9689c1;">
        <tr style="border-bottom: solid 1px #ccc;">
        <td colspan="2" class="column" style="background-color: #9689c1;color: #fff;">
    To Be Filled By <span style="font-size: 18px;padding: 0px; color: #ffcc00;">QC</span> Team
</td>        </tr>
        <tr>
           <td class="column">Comments</td> <td><field name="qc_comments"/></td>
 
        </tr>
        <tr>
            <td class="column">Authorised Signatory <button string="Approve" invisible="qc_reviewed_by_image" class="btn-primary custom_btn" type="object" name="action_qc_esign_btn"></button></td>
            <td><field name="qc_reviewed_by_image" widget="image"/></td>
        </tr>
         <tr invisible="qc_reviewed_by_image == False">
            <td style="padding: 8px;" class="column"><b>Approved On</b></td>
            <td><field name="qc_reviewed_on" readonly="1"/></td>
        </tr>
        <tr invisible="qc_reviewed_by_image == False">
            <td style="padding: 8px;" class="column"><b>Approved By</b></td>
            <td><field name="qc_reviewed_by" readonly="1"/></td>
        </tr>
    </table></div>
      <div class="col-4"><table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;width:100%;color: #000; background-color: #fff; border: solid 4px #9689c1;">
        <tr style="border-bottom: solid 1px #ccc;">
        <td colspan="2" class="column" style="background-color: #9689c1;color: #fff;">
    To Be Filled By <span style="font-size: 18px;padding: 0px; color: #ffcc00;">QA</span> Team
</td>        </tr>
        <tr>
           <td class="column">Comments</td> <td><field name="qa_comments"/></td>
 
        </tr>
        <tr>
            <td class="column">Authorised Signatory <button string="Approve" invisible="qa_reviewed_by_image" class="btn-primary custom_btn" type="object" name="action_qa_esign_btn"></button></td>
            <td><field name="qa_reviewed_by_image" widget="image"/></td>
        </tr>
         <tr invisible="qa_reviewed_by_image == False">
            <td style="padding: 8px;" class="column"><b>Approved On</b></td>
            <td><field name="qa_reviewed_on" readonly="1"/></td>
        </tr>
        <tr invisible="qa_reviewed_by_image == False">
            <td style="padding: 8px;" class="column"><b>Approved By</b></td>
            <td><field name="qa_reviewed_by" readonly="1"/></td>
        </tr>
    </table></div>
  </div>
  
        </templates>
</page>
</notebook>
<div class="row">
<div class="col-4">
<table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;background-color: #fff;border: solid 4px #9689c1;">

        <tr style="border-bottom: solid 1px #ccc;">
            <td style="padding: 8px;" class="column"><b>Prepared By</b>
            <br></br><br></br>
                <button string="Approve" invisible="prepared_by_image" class="btn-primary custom_btn" type="object" name="action_prepared_esign_btn"></button>
            </td>
            <td><field name="prepared_by_image" widget="image"/></td>
        </tr>
        <tr invisible="prepared_by_image == False">
            <td style="padding: 8px;" class="column"><b>Prepared On</b></td>
            <td><field name="prepared_on" readonly="1"/></td>
        </tr>
        <tr invisible="prepared_by_image == False">
            <td style="padding: 8px;" class="column"><b>Prepared By</b></td>
            <td><field name="prepared_by" readonly="1"/></td>
        </tr>
    </table>
</div>
<div class="col-4">
<table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;background-color: #fff;border: solid 4px #9689c1;">

        <tr style="border-bottom: solid 1px #ccc;">
            <td style="padding: 8px;" class="column"><b>CE Head Verified By</b>
            <br></br><br></br>
                <button string="Approve" invisible="ce_verified_by_image" class="btn-primary custom_btn" type="object" name="action_ce_verified_esign_btn"></button>
            </td>
            <td><field name="ce_verified_by_image" widget="image"/></td>
        </tr>
        <tr invisible="ce_verified_by_image == False">
            <td style="padding: 8px;" class="column"><b>Verified On</b></td>
            <td><field name="ce_verified_on" readonly="1"/></td>
        </tr>
        <tr invisible="ce_verified_by_image == False">
            <td style="padding: 8px;" class="column"><b>Verified By</b></td>
            <td><field name="ce_verified_by" readonly="1"/></td>
        </tr>
    </table>
    </div>
    <div class="col-4">
<table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;background-color: #fff;border: solid 4px #9689c1;">

        <tr style="border-bottom: solid 1px #ccc;">
            <td style="padding: 8px;" class="column"><b>SCG Head Verified By</b>
            <br></br><br></br>
                <button string="Approve" invisible="scg_head_verified_by_image" class="btn-primary custom_btn" type="object" name="action_scg_head_verified_esign_btn"></button>
            </td>
            <td><field name="scg_head_verified_by_image" widget="image"/></td>
        </tr>
        <tr invisible="scg_head_verified_by_image == False">
            <td style="padding: 8px;" class="column"><b>Verified On</b></td>
            <td><field name="scg_head_verified_on" readonly="1"/></td>
        </tr>
        <tr invisible="scg_head_verified_by_image == False">
            <td style="padding: 8px;" class="column"><b>Verified By</b></td>
            <td><field name="scg_head_verified_by" readonly="1"/></td>
        </tr>
    </table>
    </div>
    </div>
    <div class="row">
<div class="col-3"></div>
<div class="col-6">
    <!-- Second Table -->
<table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;background-color: #fff;border: solid 4px #9689c1;">

        <tr style="border-bottom: solid 1px #ccc;">
            <td style="padding: 8px;" class="column"><b>QA Verified By</b>
            <br></br><br></br>
                <button string="Approve" invisible="verified_by_image" class="btn-primary custom_btn" type="object" name="action_verified_esign_btn"></button>
            </td>
            <td><field name="verified_by_image" widget="image"/></td>
        </tr>
        <tr invisible="verified_by_image == False">
            <td style="padding: 8px;" class="column"><b>Verified On</b></td>
            <td><field name="verified_on" readonly="1"/></td>
        </tr>
        <tr invisible="verified_by_image == False">
            <td style="padding: 8px;" class="column"><b>Verified By</b></td>
            <td><field name="verified_by" readonly="1"/></td>
        </tr>
    </table>
</div>
<div class="col-3"></div>

</div>    

                    </sheet>
                </form>
        </field>
    </record>
<menuitem id="sos_deliverables_boq_menu"
              name="Deliverables List / BOQ"
              parent="sales_root_menu" action="action_sos_deliverables_boq_form_list" groups="sos_inventory.sos_scg_group_user,sos_inventory.sos_ce_user,sos_inventory.sos_finance_user,sos_inventory.sos_scg_group_manager,sos_inventory.sos_rd_user,sos_inventory.sos_production_user,sos_inventory.sos_qc_user,sos_inventory.sos_qa_user" />
              

</odoo>
