osbzr/gooderp_addons

View on GitHub
warehouse_wave/report/report.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0"?>
<openerp>
    <data>
        <report
             id="report_wave"
             model="wave"
             string="打印拣货单"
             name="warehouse_wave.report_wave_view"
             file="warehouse_wave.report_wave"
             report_type="qweb-pdf">
        </report>

        <template id="report_wave_view">
            <t t-foreach="docs" t-as="o">
            <t t-call="report.html_container">
                <t t-set="data_report_margin_top" t-value="20"/>
                <t t-set="data_report_header_spacing" t-value="1"/>                
                <div class="page">
                    <div class="oe_structure">
                        <div class="row" style="font-size: 12px;">
                            <div class='text-center'>
                                <h2 class='oe_inline' style="font-size: 16px;">捡货单</h2>
                            </div>
                            <div style="float:left">
                                <p>拣货单号:<span t-field="o.name"/></p>
                                <p>订单类型:<span t-field="o.order_type"/></p>
                                <p>承运商:<span t-field="o.express_type"/></p>
                            </div>
                            <div style="float:right">
                                <p>打印时间:<span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/></p>
                                <p>打印员:<span t-field="o.create_uid.name"/></p>
                            </div>
                            <table class="table table-condensed">
                                <theard>
                                    <tr>
                                        <th width='10%'>序号</th>
                                        <th width='10%'>库位</th>
                                        <th width='10%'>捡货数量</th>
                                        <th width='10%'>格子号</th>
                                        <th width='10%'>对应数量</th>
                                        <th width='20%'>货品代码</th>
                                        <th width='30%'>货品名称</th>
                                    </tr>
                                </theard>
                                <tbody class="sale_tbody">
                                    <t t-foreach="o.line_ids" t-as="l"  >
                                        <tr>
                                            <td>
                                                 <span><t t-esc='l_index+1'/></span>
                                            </td>
                                            <td>
                                                <t t-foreach="l.line_location_ids" t-as="loc">
                                                    <span t-field="loc.location_id.name"/><br/>
                                                </t>
                                            </td>
                                            <td>
                                                <t t-foreach="l.line_location_ids" t-as="loc">
                                                    <span t-field="loc.picking_qty"/><br/>
                                                </t>
                                            </td>
                                            <td>
                                                <t t-foreach="l.move_line_ids.sorted(key=lambda x: int(x.move_id.pakge_sequence))" t-as="move_line">
                                                    (<span t-field="move_line.move_id.pakge_sequence"/>)<br/>
                                                </t>
                                            </td>
                                            <td>
                                                <t t-foreach="l.move_line_ids.sorted(key=lambda x: int(x.move_id.pakge_sequence))" t-as="move_line">
                                                    <span t-field="move_line.goods_qty"/><br/>
                                                </t>
                                            </td>
                                            <td>
                                                <span t-field="l.goods_id.code"/>
                                            </td>
                                            <td>
                                                <span t-field="l.goods_id.name"/>
                                            </td>
                                        </tr>
                                    </t>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </t>    
            </t>
        </template>
    </data>
</openerp>