Skip to content
  • Categories
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse

Odoo 中文社区

  1. Home
  2. Categories
  3. Odoo 新手求助
  4. 页脚显示不出来,是这样有问题吗?但页头却可以显示的

页脚显示不出来,是这样有问题吗?但页头却可以显示的

Scheduled Pinned Locked Moved Odoo 新手求助
1 Posts 1 Posters 732 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 风 Offline
    风 Offline
    风飞花
    wrote on last edited by
    #1
    <?xml version="1.0" encoding="UTF-8"?>
    <odoo>
        <record id="paperformat_euro_landscape"
            model="report.paperformat">
            <field name="name">delivery_Paper</field>
            <field name="default" eval="True" />
            <field name="format">custom</field><!--一个预定义的格式如(A0-A9,B0-B10等)或自定义,默认是A4-->
            <field name="page_height">140</field>
            <field name="page_width">215</field>
            <field name="orientation">Landscape</field><!--横向或纵向 Landscape , Portrait-->
            <field name="margin_top">40</field>
            <field name="margin_bottom">20</field>
            <field name="margin_left">5</field>
            <field name="margin_right">5</field>
            <field name="header_line" eval="False" /><!--是否显示标题行-->
            <field name="header_spacing">35</field><!--头部空白-->
            <field name="dpi">90</field>
        </record>
        <template id="custom_report_delivery_document">
            <t t-call="web.html_container">
            <t t-if="o and 'company_id' in o">
                <t t-set="company" t-value="o.company_id"></t>
            </t>
            <t t-if="not o or not 'company_id' in o">
                <t t-set="company" t-value="res_company"></t>
            </t>
            <div class="header">
                <div class="row mt16 mb16">
                    <div class="col-6" style="border-bottom:1px solid #000">
                        <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % to_text(company.logo)" style="max-height: 50px;" />
                    </div>
                    <div class="col-6 text-right" style="border-bottom:1px solid #000">
                        <span t-field="company.partner_id" />
                        <br/>
                        <span t-field="company.partner_id.country_id" />
                        <span t-field="company.partner_id.state_id" />
                        <span t-field="company.partner_id.city" />
                        <span t-field="company.partner_id.street" />
                        <span t-field="company.partner_id.street2" />
                        <span t-field="company.partner_id.vat" />
                        <br/>
                    </div>
                </div>
                <div class="row mt16 mb32">
                    <div class="col-6">
                        出库单号:<span t-field="o.name" />
                        <br/>
                        订    单    号:<span t-field="o.origin" />
                    </div>
                    <div t-if="o.state" class="col-6 text-right" name="div_sched_date">
                        <strong>发货日期:</strong>
                        <t t-if="o.state == 'done'">
                            <span t-field="o.date_done" t-options='{"widget": "date"}'/>
                        </t>
                        <t t-if="o.state != 'done'">
                            <span t-field="o.scheduled_date" t-options='{"widget": "date"}'/>
                       </t>
                    </div>
                </div>
            </div>
                <div class="footer">
                    <div class="row mt32 mb32">
                        <div class="col-6" style="border-top:1px solid #000">
                            测试,左边
                        </div>
                        <div class="col-6 text-right" style="border-top:1px solid #000">
                            客户签收:
                        </div>
                    </div>
                    <div class="row mt16 mb16">
                        <div class="col-auto" style="border-top:1px solid #000">
                            制单人:<span t-field="o.write_uid" />
                        </div>
                    </div>
                </div>
    
                <t t-call="web.internal_layout"><!--external_layout头部和底部  internal_layout基本头部-->
                    <t t-set="o" t-value="o.with_context(lang=o.partner_id.lang)" />
                    <div class="page">
                        <div class="oe_structure"/>
                        <div class="row mt16 mb32">
                            <div t-if="o.move_lines and o.move_lines[0].partner_id and o.move_lines[0].partner_id.id != o.partner_id.id">
                                收货人及电话:<span t-field="o.partner_id"/>
                                <span>:
                                    <span t-field="o.partner_id.mobile"/>/
                                    <span t-field="o.partner_id.phone"/>
                                </span>
                                <br/>
                                收货地址:<span t-field="o.partner_id.country_id"/>
                                <span t-field="o.partner_id.state_id" />
                                <span t-field="o.partner_id.city" />
                                <span t-field="o.partner_id.street"/>
                                <span t-field="o.partner_id.street2" />
                                <span t-field="o.partner_id.zip" />
                                <br/>
                                <div t-field="o.partner_id.vat"/>
                            </div>
                            <div t-if="(o.move_lines and o.move_lines[0].partner_id and o.move_lines[0].partner_id.id == o.partner_id.id) or o.move_lines and not o.move_lines[0].partner_id">
                                收货人及电话:<span t-field="o.partner_id"/>
                                <span>:
                                    <span t-field="o.partner_id.mobile"/>/
                                    <span t-field="o.partner_id.phone"/>
                                </span>
                                <br/>
                                收货地址:<span t-field="o.partner_id.country_id"/>
                                <span t-field="o.partner_id.state_id" />
                                <span t-field="o.partner_id.city" />
                                <span t-field="o.partner_id.street"/>
                                <span t-field="o.partner_id.street2" />
                                <span t-field="o.partner_id.zip" />
                                <br/>
                                <div t-field="o.partner_id.vat"/>
                            </div>
                        </div>
                        <div class="row mt16 mb32">
                            <div class="col-auto" name="div_carrier_id">
                                <strong>承运方:</strong>
                                <p t-field="o.carrier_id"/>
                            </div>
                            <div class="col-auto" name="div_weight">
                                <strong>重量:</strong>
                                <p t-field="o.weight"/>
                            </div>
                            <div class="col-auto" name="div_volume">
                                <strong>体积:</strong>
                                <p t-field="o.volume"/>
                            </div>
                        </div>
                        <!--<table class="table table-sm" t-if="o.state!='done'" name="stock_move_table">-->
                        <table class="table table-sm" name="stock_move_table">
                            <thead>
                                <tr>
                                    <th><strong>产品</strong></th>
                                    <th><strong>数量</strong></th>
                                </tr>
                            </thead>
                            <tbody>
                                <t t-set="lines" t-value="o.move_lines.filtered(lambda x: x.product_uom_qty)"/>
                                <tr t-foreach="lines" t-as="move">
                                    <td>
                                        <span t-field="move.product_id"/>
                                        <p t-if="o.picking_type_code == 'outgoing'">
                                            <span t-field="move.product_id.sudo().description_pickingout"/>
                                        </p>
                                        <p t-if="o.picking_type_code == 'incoming'">
                                            <span t-field="move.product_id.sudo().description_pickingin"/>
                                        </p>
                                    </td>
                                    <td>
                                        <span t-field="move.product_uom_qty"/>
                                        <span t-field="move.product_uom"/>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <p>
                            <t t-if="o.backorder_ids and o.backorder_ids.filtered(lambda x: x.state not in ('done', 'cancel'))">
                                All items couldn't be shipped, the remaining ones will be shipped as soon as they become available.
                            </t>
                        </p>
                    </div>
                </t>
             </t>
        </template>
    
        <template id="custom_report_deliveryslip">
            <t t-foreach="docs" t-as="o">
                <t t-call="mymodule.custom_report_delivery_document" t-lang="o.partner_id.lang"/>
            </t>
        </template>
        <report
            string="自定义出库单"
            id="action_custom_report_delivery"
            model="stock.picking"
            report_type="qweb-pdf"
            name="mymodule.custom_report_deliveryslip"
            file="mymodule.custom_report_deliveryslip"
            print_report_name="'delivery - %s - %s' % (object.partner_id.name or '', object.name)"
        />
    </odoo>
    
    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Tags
    • Popular
    • Users
    • Groups