acc_purchase_report_view.xml 19.9 KB
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
    <template id="unovo_report_purchaseorder">
        <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:center;
                    height:20px;
                    font-size:16px;
                    border:1px solid #ccc;
                    }
                    .unovo-report-purchase-table td{
                    height:20px;
                    font-size:16px;
                    border:1px solid #ccc;
                    background:#FFF
                    text-align: center;
                    }
                    .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="header">
                        <div class="row">
                            <div class="col-xs-3">
                            <span t-field="o.purchase_company.name"/>
                            </div>
                        </div>
                    </div> -->
                    <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>
                    <br/>
                    <table class="unovo-report-purchase-table" border="1px" cellspacing="0" cellpadding="0">
                            <tr>
                                <th colspan="10" class="text-center">
                                    <strong><span t-field="o.purchase_company.name"/></strong>
                                </th>
                            </tr>
                            <tr>
                                <th colspan="10" class="text-center">
                                    <strong>采 购 合 同</strong>
                                </th>
                            </tr>
                            <tr>
                                <td colspan="5" class="text-center">
                                    合同编号:<span t-field="o.name"/>
                                </td>
                                <td colspan="5" class="text-center">
                                    下单日期:<span t-field="o.gen_date"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="text-center">
                                    甲方(需方)
                                </td>
                                <td colspan="3" class="text-center">
                                    <span t-field="o.purchase_company.name"/>
                                </td>
                                <td colspan="2" class="text-center">
                                    乙方(卖方)
                                </td>
                                <td colspan="3" class="text-center">
                                    <span t-field="o.partner_id.name"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="text-center">
                                    甲方联系人
                                </td>
                                <td colspan="3" class="text-center">
                                    <span t-field="o.charge_person.partner_id.name"/>
                                </td>
                                <td colspan="2" class="text-center">
                                    乙方联系人
                                </td>
                                <td colspan="3" class="text-center">
                                    <span t-field="o.contact_id.name"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="text-center">
                                    甲方电话:
                                </td>
                                <td colspan="3" class="text-center">
                                    <span t-field="o.charge_person.partner_id.mobile"/>
                                </td>
                                <td colspan="2" class="text-center">
                                    乙方电话:
                                </td>
                                <td colspan="3" class="text-center">
                                    <span t-field="o.contact_id.mobile"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="10" class="text-left">
                                    甲方向乙方订购以下产品,请按照要求货期准时送货。
                                </td>
                            </tr>
                            <tr>
                                <th style="width:5%;">
                                    序 号
                                </th>
                                <!-- <th>
                                    <strong>物料编码</strong>
                                </th> -->
                                <th style="width:9%;">
                                    名称
                                </th>
                                <th style="width:9%;">
                                    规格型号
                                </th>
                                <th style="width:8%;">
                                    供应商编号
                                </th>
                                <th style="width:15%;">
                                    描述
                                </th>
                                <th style="width:8%;">
                                    品牌
                                </th>
                                <th style="width:7%;">
                                    数量
                                </th>
                                <th style="width:5%;">
                                    单位
                                </th>
                                <th style="width:9%;">
                                    单价
                                </th>
                                <th style="width:10%;">
                                    金额小计
                                </th>
                                <th style="width:15%;">
                                    交货日期
                                </th>
                            </tr>
                            <tr t-foreach="o.order_line" t-as="line">
                                <td class="text-center">
                                    <span t-esc="line_index + 1"></span>
                                </td>
                                <!-- <td class="text-center">
                                    <span t-field="line.product_id.default_code"/>
                                </td> -->
                                <td class="text-center">
                                    <span t-field="line.product_id.name"/>
                                </td>
                                <td class="text-center">
                                    <span t-field="line.product_id.product_tmpl_id.product_model"/>
                                </td>
                                <td class="text-center">
                                    <span t-field="line.product_id.product_tmpl_id.partner_code"/>
                                </td>
                                <td class="text-center">
                                    <span t-field="line.product_id.product_tmpl_id.product_describe_cn"/>
                                </td>
                                <td class="text-center">
                                    <span t-field="line.product_id.product_tmpl_id.brand"/>
                                </td>
                                <td class="text-center">
                                    <span t-esc="'{:,}'.format(int(line.product_qty))"/>
                                </td>
                                <td class="text-center">
                                    <span t-field="line.product_id.product_tmpl_id.uom_po_id"/>
                                </td>
                                <td class="text-center">
                                    <span t-field="line.price_unit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
                                </td>
                                <!-- <td>
                                    <span t-esc="', '.join(map(lambda x: x.name, line.taxes_id))"/>
                                </td> -->
                                <td class="text-center">
                                    <!-- <span t-esc="'{:.2f}'.format(round(line.price_unit*line.product_qty,2))" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/> -->
                                    <span t-esc="line.price_unit*line.product_qty" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
                                </td>
                                <td class="text-center">
                                    <span t-field="o.forcast_date"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="10" class="text-left">
                                    备注:<span t-field="o.notes"/>
                                </td>
                                <!-- <th colspan="1">
                                    <span t-esc="o.amount_untaxed" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
                                </th> -->
                            </tr>
                        </table>
                    <!-- <div>
                        <div class="col-xs-12" style="text-align: right;">
                            <strong>未含税金额:</strong><span t-esc="o.amount_untaxed" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
                        </div>
                    </div>
                    <div>
                        <div class="col-xs-12" style="text-align: right;">
                            <strong>税金:</strong><span t-esc="o.amount_tax" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
                        </div>
                    </div>
                    <div>
                        <div class="col-xs-12" style="text-align: right;">
                            <strong>总计:</strong><span t-esc="o.amount_total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
                        </div>
                    </div> -->
                    <div class="unovo-report-purchase-content">
                        <p>
                            一、本合同合计金额大写:人民币<span t-esc="total.get('upper_amount', '')"/><span t-esc="o.amount_total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>)。
                        </p>
                        <p>
                            二、订购产品名称、规格型号、订购数量、价格、交货日期等参见上表。
                        </p>
                        <p>
                            三、包装与标识要求:
                                <p style="text-indent:2em;">1、乙方必需提供适合产品运输和存储要求的有效原包装;</p>
                                <p style="text-indent:2em;">2、乙方必须在所有产品外包装上标注:供应商名称、规格型号、内装数量、合同编号等内容;</p>
                                <p style="text-indent:2em;">3、所有包装费用由乙方自行承担。</p>

                        </p>
                        <p>
                            四、交货地点:
                                <p style="text-indent:2em;">1、收货公司:<span t-field="o.purchase_company.name"/></p>
                                <p style="text-indent:2em;">地址:<span t-field="o.delivery_address.name"/></p>
                                <p style="text-indent:2em;">收货人:<span t-field="o.delivery_address.charge"/> 联系电话:<span t-field="o.delivery_address.phone"/></p>
                                <p style="text-indent:2em;">2、乙方应将产品运送至上述甲方地址(或其他地址),运输费用由乙方自行承担。<br/></p>
                        </p>
                        <p>
                            五、产品验收:
                                <p style="text-indent:2em;">1、甲方应在收到乙方产品之日起7日内进行验收。</p>
                                <p style="text-indent:2em;">2、若甲方验收时发现产品存在质量、包装、损坏等问题,或乙方未按合同约定提供相应产品的,有权要求乙方更换,因此产生的额外费用由乙方承担。</p>

                        </p>
                        <p>
                            六、货款支付与结算方式:
                            <p style="text-indent:2em;">
                            (一)货款支付方式选择如下方式。</p>
                            <p style="text-indent:2em;"><span t-field="o.payment_rule"/></p>
                            <p style="text-indent:2em;">(二)甲方应将相应货款汇入乙方指定银行账户</p>
                            <p style="text-indent:2em;">乙方银行账户:<span t-esc="partner_info.get('bank_number', '')"/></p>
                            <p style="text-indent:2em;">开   户   行:<span t-esc="partner_info.get('bank_name', '')"/></p>
                        </p>
                        <p>
                            七、质量保证:
                                <p style="text-indent:2em;">1、验货标准,按照相应运营商产品规格及质量进行验货。乙方应当提供产品规格及质量标准供甲方参考。</p>
                                <p style="text-indent:2em;">2、产品的使用期质保期:乙方产品的使用期为1年,自收货日期开始计算。</p>
                                <p style="text-indent:2em;">3、若在使用期内产品出现损坏或无法正常使用,甲方有权要求乙方更换,因此产生的额外费用由乙方承担。</p>
                                <p style="text-indent:2em;">4、本次生产的产品必需与运营商样品质量一致。</p>
                        </p>
                        <p>
                            八、发货时间:
                                <p style="text-indent:2em;">乙方应在本合同签订之日起<span t-field="o.delivery_time"/>个工作日内发货,否则,乙方需承担迟延发货的违约责任。</p>

                        </p>
                        <p>
                            九、本合同履行过程中一方如需变更要求,应提前7天通知对方,否则,对方有权拒绝。<br/>
                        </p>
                        <p>
                            十、违约责任:
                                <p style="text-indent:2em;">1、甲方逾期付款,每逾期一日需支付乙方合同金额1‰的违约金,逾期超过五日,乙方有权单方解除合同。</p>
                                <p style="text-indent:2em;">2、乙方逾期发货的,每逾期一日需支付甲方合同金额1%的违约金,逾期超过五日,甲方有权单方解除合同。</p>

                        </p>
                        <p>
                            十一、合同效力:
                                <p style="text-indent:2em;">1、本合同自双方代表签字并加盖公司公章或合同专用章后生效;</p>
                                <p style="text-indent:2em;">2、双方未约定内容可另行签署补充协议作为本合同附件,与本协议效力相同。</p>

                        </p>
                        <p>
                            十二、争议解决
                                <p style="text-indent:2em;">因履行本合同发生争议,由当事人协商解决,协商不成的,可依法向甲方所在地人民法院提起诉讼。</p>
                        </p>
                        <p>
                            十三、本合同一式两份,双方各执一份,效力相同。
                        </p>
                    </div>
                    <div class="row unovo-report-purchase-footer">
                        <div class="col-xs-6" style="width: 50%;text-align: left;">
                            <strong>供方:</strong>单位名称(章)<br/>
                            <!-- <span t-field="o.purchase_company.name"/> -->
                            <span t-field="o.partner_id.name"/>
                        </div>
                        <div class="col-xs-6">
                            <strong>需方:</strong>单位名称(章)<br/>
                            <!-- <span t-field="o.partner_id.name"/> -->
                            <span t-field="o.purchase_company.name"/>
                        </div>
                    </div>
                    <br/>
                    <br/>
                    <br/>
                    <div class="row unovo-report-purchase-footer">
                        <div class="col-xs-6" style="width: 50%;text-align: left;">
                            <strong>日期:</strong>
                        </div>
                        <div class="col-xs-6">
                            <strong>日期:</strong>
                        </div>
                    </div>
                    <br/>
                    <br/>
                </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>