acc_purchase_report_view.xml 23.2 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="11" class="text-center">
                                    <strong><span t-field="o.purchase_company.name"/></strong>
                                </th>
                            </tr>
                            <tr>
                                <th colspan="11" class="text-center">
                                    <strong>采 购 合 同</strong>
                                </th>
                            </tr>
                            <tr>
                                <td colspan="5" class="text-center">
                                    合同编号:<span t-field="o.name"/>
                                </td>
                                <td colspan="6" 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="4" 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="4" 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="4" class="text-center">
                                    <span t-field="o.contact_id.mobile"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="11" class="text-left">
                                    甲方向乙方订购以下产品,请按照要求货期准时送货。
                                </td>
                            </tr>
                            <tr>
                                <th style="width:5%;">
                                    序 号
                                </th>
                                <!-- <th>
                                    <strong>物料编码</strong>
                                </th> -->
                                <th style="width:9%;">
                                    名称
                                </th>
                                <th style="width:11%;">
                                    规格型号
                                </th>
                                <th style="width:7%;">
                                    供应商编号
                                </th>
                                <th style="width:16%;">
                                    描述
                                </th>
                                <th style="width:7%;">
                                    品牌
                                </th>
                                <th style="width:7%;">
                                    数量
                                </th>
                                <th style="width:5%;">
                                    单位
                                </th>
                                <th style="width:9%;">
                                    单价
                                </th>
                                <th style="width:9%;">
                                    金额小计
                                </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="11" 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 style="text-indent:2em;">3、乙方应当严格按照本订单约定交期向甲方交付产品,未经甲方提前书面同意,不得迟延、提前或分批交付。乙方逾期交付产品的,应当按照订单金额的3‰/日向甲方支付逾期违约金了,且甲方有权解除订单,甲方解除订单的,乙方应按照订单金额的30%向甲方承担违约责任,不足以弥补甲方的损失的(包括但不限于甲方因此向甲方客户承担的逾期违约责任、从第三方购买替代品所产生的额外费用等),乙方应当补足。</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、质量标准:国家标准、行业标准、原厂标准及双方约定的其他标准。卖方提供的产品应当是全新原包装正品,产品到买方指定交货地点时剩余的有效期应大于全部有效期的75%。甲方不得隐瞒、改造、变造产品信息(包括但不限于品牌、原料、产地、生产厂商、生产日期、有效日期等)。乙方对于质量保证及保修的承诺对象不仅限于甲方,在甲方有要求时,乙方同意为甲方的客户、最终客户或其他第三方提供本协议所述之保证及服务;乙方接到质保/保修要求的,应当在12个小时内响应并处理</p>
                                <p style="text-indent:2em;"> 2.乙方应当向甲方主动、如实披露所有产品的信息,包括但不限于生厂商、货权、授权情况、有效期等,乙方不得向甲方交付不符合甲方要求的产品或违反乙方自身有义务遵守的货源渠道规则的产品。乙方交付的产品不符合订单规定的,乙方应向甲方退还全部货款,并承担订单金额的100%作为违约,并由乙方根据甲方的指示负责包换、保修或退货,并承担因此产生的费用。</p>
                                <p style="text-indent:2em;">3.乙方向甲方交付重大瑕疵产品的(包括但不限于假货、已使用、翻新、变造、替换零部件、伪造贴标/铭牌,或以买多发少、买高价发低价产品、以次充好、无交易有结算、滥用或泄漏甲方客户信息等不正当手段损害甲方或甲方客户利益的),乙方应当按照 违约订单商品数量乘以甲方向终端客户销售该产品的单价计算所得)总价的十倍进行赔偿,并承担甲方采取补救措施所支出的必要费用,包括但不限于向甲方客户赔偿的费用等。</p>
                                <p style="text-indent:2em;">4.除上述约定外,乙方违反/不履行本订单其他条款或因乙方提供的产品造成甲方损失的,由乙方承担所有损失(包括但不限于人工费、运输费、包装费、挑拣费、返修费、重置费、报废损失、客户索赔、人身伤害等赔偿);任何情况下赔偿金额无法计算或低于订单总金额30%的,乙方按照订单总金额的30%承担违约金。</p>
                                <p style="text-indent:2em;">5、产品的质保期:乙方产品的质保期为【1】年,自验收日起开始计算。</p>
                                <p style="text-indent:2em;">6、若在质保期内产品出现损坏或无法正常使用,甲方有权要求乙方更换,因此产生的额外费用由乙方承担。维修二次及二次以上或更换后仍无法正常使用或产品出现损坏的,甲方有权要求退货并取消订单,由此所产生的损失及费用由乙方承担(包括律师费、调查费、诉讼仲裁费、差旅费、诉讼保全担保费用等)。</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%的违约金,逾期超过三十日,甲方有权单方解除合同。</p>

                        </p>
                        <p>
                            十一、保密协议:
                                <p style="text-indent:2em;">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>