purchase_invoice_report_views.xml 8.5 KB
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
    <template id="acct_report_purchase_invoice">
        <t t-call="web.basic_layout">
            <t t-foreach="docs" t-as="o">
                <style tyle="text/css">
                    .unovo-report-purchase-title {
                    font-family:"DengXian";
                    font-size: 25px;
                    font-weight: bold;
                    text-align:center;
                    line-height:40px;
                    }
                    .unovo-report-purchase-header {
                    font-family:"DengXian";
                    line-height:22px;
                    font-size:16px;
                    text-align:right;
                    }
                    .unovo-report-purchase-table {
                    vertical-align: middle;
                    font-family:"DengXian";
                    border:1px solid #ccc;
                    width:100%;
                    border-collapse:collapse;
                    border:1px solid #ccc;
                    background:#FFF
                    }
                    .unovo-report-purchase-table th{
                    font-weight:bold;
                    text-align:left;
                    height:20px;
                    font-size:16px;
                    border:1px solid #ccc;
                    }
                    .unovo-report-purchase-table td{
                    height:30px;
                    font-size:16px;
                    border:1px solid #ccc;
                    background:#FFF
                    text-align: left;
                    }
                    .unovo-report-purchase-total {
                    line-height:20px;
                    font-size:16px;
                    }
                    .unovo-report-purchase-content {
                    font-family:"DengXian";
                    line-height:22px;
                    font-size:16px;
                    }
                    .unovo-report-purchase-content p {
                    margin:5px 0px;
                    }
                    .unovo-report-purchase-footer {
                    font-family:"DengXian";
                    line-height:22px;
                    font-size:16px;
                    }
                </style>
                <div class="page">
                    <div class="row unovo-report-purchase-title">
                        <div class="col-xs-6" style="width: 50%;text-align: left;">
                            <!-- <img t-att-src="'data:image/jpg;base64,%s' % o.purchase_company.logo" style="max-height: 45px;"/> -->
                            <img t-att-src="'data:image/png;base64,%s' % logo" style="max-height: 110px;width:170px"/>
                        </div>
                    </div>
                    <div class="unovo-report-purchase-title">付 款 单</div>
                    <br/>
                    <br/>
                    <!-- <div class="unovo-report-purchase-content">
                        <p>
                            申请日期:<span t-field="o.date_due"/>
                        </p>
                    </div> -->
                    <table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
                            <tr>
                                <td class="text-center" style="width:30%;height:40px;align=left">
                                    申请人
                                </td>
                                <td class="text-center">
                                    <span t-field="o.user_id.name"/>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-center" style="width:30%;height:40px">
                                    付款公司
                                </td>
                                <td class="text-center">
                                    <span t-field="o.invoice_company.name"/>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-center" style="width:30%;height:40px">
                                    到期时间
                                </td>
                                <td class="text-center">
                                    <span t-field="o.date_due"/>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-center" style="width:30%;height:40px">
                                    金额
                                </td>
                                <td class="text-center">
                                    <span t-esc="final_datas.get('residual', '')" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
                                    <!-- <span t-esc="total.get('upper_amount', '')"/> -->
                                </td>
                            </tr>
                            <tr>
                                <td class="text-center" style="width:30%;height:40px">
                                    收款公司
                                </td>
                                <td class="text-center">
                                    <span t-field="o.partner_id.name"/>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-center" style="width:30%;height:40px">
                                    开户行/收款账户
                                </td>
                                <td class="text-center">
                                    <span t-esc="final_datas.get('bank_str', '')" style="width:30%;height:40px"/>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-center" style="width:30%;height:40px">
                                    事由
                                </td>
                                <td class="text-center">
                                    <span t-esc="final_datas.get('po_names', '')" style="width:30%;height:40px"/>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-center" style="width:30%;height:40px">
                                    发票号
                                </td>
                                <td class="text-center">
                                    <span t-esc="final_datas.get('invoice_str', '')" style="width:30%;height:40px"/>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-center" style="width:30%;height:40px">
                                    备注
                                </td>
                                <td class="text-center">
                                    <span t-esc="final_datas.get('note_str', '')" style="width:30%;height:40px"/>
                                </td>
                            </tr>
                            <!-- <tr>
                                <td class="text-center" style="width:30%;height:40px">
                                    打印日期
                                </td>
                                <td class="text-center">
                                    <span t-esc="final_datas.get('today', '')"/>
                                </td>
                            </tr> -->
                    </table>
                    <br/>
                    <br/>
                    <div class="unovo-report-purchase-content" style="text-align: right;">
                        <p>
                            打印日期:<span t-esc="final_datas.get('today', '')"/>
                        </p>
                    </div>
                </div>
                <div style="page-break-after:always;"></div>
            </t>

            <!-- <t t-foreach="docs" t-as="doc">
                <t t-set="doc" t-value="doc.with_context({'lang':doc.partner_id.lang})"/>
            </t> -->
        </t>
    </template>
<!--         <template id="unovo_report_purchaseorder">
        <t t-call="report.html_container">
            <t t-foreach="doc_ids" t-as="doc_id">
                <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'unovo_report.unovo_report_purchaseorder_document')"/>
            </t>
        </t>
    </template> -->
</data>
</odoo>