<odoo>
<record id="action_report_proposal" model="ir.actions.report">
    <field name="name">Proposal</field>
    <field name="model">sos_proposal_builder</field>
    <field name="report_type">qweb-pdf</field>
    <field name="report_name">sos_sales.report_proposal</field>
</record>


<template id="report_proposal">
    <t t-call="web.html_container">
        <t t-foreach="docs" t-as="o">
            <t t-call="web.external_layout">
             <link rel="stylesheet" href="/sos_inventory/static/src/css/style.css" />
                <div class="page">
                <br></br><br></br><br></br><br></br>
                <br></br><br></br><br></br><br></br>
                <br></br><br></br><br></br><br></br>
                    <t t-if="o.customer_logo">
                   <table class="table_custom" style="text-align: center;">
                   <tr>
                    <td><img style="height:100px;width:180px" src="/sos_sales/static/src/img/sosaley_logo.png"/></td>
                   <td><img style="height:150px;width:150px" src="/sos_sales/static/src/img/customer_relationship.png"/></td>
                   <td><img style="height:150px;width:150px" t-if="o.customer_logo" t-att-src="'data:image/png;base64,%s' % (o.customer_logo.decode())"/></td>
                   </tr></table>
                   </t>
                   <t t-else="">
    <table class="table_custom" style="text-align: center;">
        <tr>
            <td><img style="height:100px;width:180px" src="/sos_sales/static/src/img/sosaley_logo.png"/></td>
            <td><img style="height:150px;width:150px" src="/sos_sales/static/src/img/customer_relationship.png"/></td>
            <td><span><h2><t t-esc="o.customer_name"/></h2></span></td>
        </tr>
    </table>
</t>
<div style="page-break-after: always;"></div>

                    <h4 style="text-align: center;text-transform: uppercase;text-shadow: 1px 1p 1px #140718;color: #65407c;padding:5px;"><t t-esc="o.proposal_heading"/></h4><br></br>  
                    <h4>1. INTRODUCTION</h4>
                    <h5>ABOUT SOSALEY</h5>
                    <p><t t-esc="o.about_sosaley"/></p>
                    <h4>2. PROPOSAL OBJECTIVE</h4>
                    <t t-esc="o.proposal_objective"/>
                    <h4>3. PROPOSAL OVERVIEW</h4>
                    <t t-esc="o.proposal_overview"/>
                    <h4>4. ARCHITECTURE</h4>
                    <t t-foreach="o.technical_diagrams" t-as="line_items" t-index="index">
                      <p style="text-transform:uppercase;text-decoration:underline;font-weight:bold"><t t-esc="line_items.image_name"/></p>
                      <img style="height:400px;width:600px" t-if="line_items.image" t-att-src="'data:image/png;base64,%s' % (line_items.image.decode())"/>             
                      <br></br>
                    </t>
                    <h5>PARAMETERS MONITORED</h5>
                    <t t-esc="o.parameters_monitored"/>
                    <br></br>
                    <h4>5. QUOTATION</h4>
                    <table class="table_custom">
                    <tr style="background-color:#ddd"><td colspan="2">Customer Details</td></tr>
                    <tr><td>Billing Address</td><td><t t-esc="o.billing_address"/></td></tr>
                    <tr><td>Shipping Address</td><td><t t-esc="o.shipping_address"/></td></tr>
                    <tr><td>Contact Person</td><td><t t-esc="o.contact_person"/></td></tr>
                    <tr><td>Contact Number</td><td><t t-esc="o.contact_number"/></td></tr>
                    <tr><td>Email ID</td><td><t t-esc="o.email_id"/></td></tr>
                    <tr style="background-color:#ddd"><td colspan="2">Quotation Details</td></tr>
                    <tr><td>Quotation No</td><td><t t-esc="o.quotation_no"/></td></tr>
                    <tr><td>Quotation Date</td><td><t t-esc="o.quotation_date"/></td></tr>
                    <tr><td>Quotation Validity</td><td><t t-esc="o.quotation_validity"/></td></tr>
                    <tr><td>Inquiry Ref No</td><td><t t-esc="o.inquiry_ref_no"/></td></tr>
                    </table>
                    <br></br>
                    <table class="table_custom">
                    <thead><td><b>Final Costing</b></td></thead>
        <tr>
            <td>₹ <t t-esc="o.total_with_buffer"/></td>
        </tr>
</table>

                    <h4>6. PAYMENT TERMS</h4>
                    <t t-esc="o.payment_terms"/>
                    <h4>7. TERMS AND CONDITIONS</h4>
                    <t t-esc="o.terms_and_conditions"/>

                </div>
            </t>
        </t>
    </t>
</template>

</odoo>
