qweb报表如何设置行数?

温馨a12 发布于 2016/09/22 14:17
阅读 291
收藏 0

odoo的报表打印的时候,如果产品超过30个以后,就重新在另一张纸上面打印。

如何设置报表的行数?

<?xml version="1.0" encoding="utf-8"?>
<dotop>
	<data>
		<template id="report_sale_order_jjt">
			<t t-call="report.internal_layout">
				<div class="page;col-xs-4 col-xs-offset-8">
					<h4 align="center" style="margin-top:0px">
						<span t-if="o.state not in ['draft','sent']">烟台久经堂生物科技有限公司销售单</span>
						<span t-if="o.state in ['draft','sent']">烟台久经堂生物科技有限公司销售单</span>
					</h4>
					<div>
						<div style="width:33%;float:left;font-size:12px"><span>进货人:<t t-esc="o.partner_id.name" /></span></div>
						<div style="width:33%;float:left;font-size:12px"><span>日期:<t t-esc="o.date_order" /></span></div>
						<div style="width:33%;float:left;font-size:12px"><span>销售单号:<t t-esc="o.name" /></span></div>
					</div>
					<div>
						<div style="width:33%;float:left;font-size:12px"><span>收货人:<t t-esc="o.receive_person.name" /></span></div>
						<div style="width:33%;float:left;font-size:12px"><span>电话:<t t-esc="o.receive_phone" /></span></div>
						<div style="width:33%;float:left;font-size:12px"><span>打款金额:<t t-esc="o.real_amount" /></span></div>
					</div>
					<div>
						<div style="width:33%;float:left;font-size:12px"><span>消费税:<t t-esc="o.sale_tax" /></span></div>
					</div>
					<div style="margin-bottom:50px">
						<div style="width:33%;float:left;clear:both;white-space:nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;font-size:12px">
							<span>收货地址:<t t-esc="o.receive_address" /></span>
						</div>
					</div>

					<table class="table table-bordered" style="font-size:11px">
						<thead>
							<tr>
								<th style="width:10%;text-align:center">商品名称</th>
								<th style="width:12%;text-align:center">规格</th>
								<th style="width:9%;text-align:center">数量</th>
								<th style="width:10%;text-align:center">出库数量</th>
								<th style="width:9%;text-align:center">单位</th>
								<th style="width:10%;text-align:center">单价</th>
								<th style="width:10%;text-align:center">金额</th>
								<th style="width:10%;text-align:center">活动配送</th>
								<th style="width:10%;text-align:center">单独结算</th>
								<th style="width:10%;text-align:center">备注</th>
							</tr>
						</thead>
						<tbody>
							<tr t-foreach="o.order_line" t-as="line">
								<td style="line-height:1.3"><span><t t-esc="line.product_id.name" /></span></td>
								<td style="line-height:1.3"><span><t t-esc="line.product_id.variant_string" /></span></td>
								<td style="line-height:1.3;text-align:right"><span><t t-esc="line.product_uom_qty" /></span></td>
								<td style="line-height:1.3"><span></span></td>
								<td style="line-height:1.3"><span><t t-esc="line.product_uom.name" /></span></td>
								<td style="line-height:1.3;text-align:right"><span><t t-esc="line.sale_price" /></span></td>
								<td style="line-height:1.3;text-align:right"><span><t t-esc="line.sale_price_subtotal" /></span></td>
								<td style="line-height:1.3"><span><t t-if="line.is_gift == True">是</t></span></td>
								<td style="line-height:1.3"><span><t t-if="line.is_lone == True">是</t></span></td>
								<td style="line-height:1.3"><span><t t-esc="line.note" /></span></td>
							</tr>
							<tr style="font-weight:bold">
								<td><span>合计</span></td>
								<td colspan="9" style="text-align:center;vertical-align:middle;">
									<span style="padding-left:10px">订货数量:<t t-esc="o.order_quantity" /></span>
									<span style="padding-left:10px">活动配送额:<t t-esc="o.gift_amount" /></span>
									<span style="padding-left:10px">独立结算额:<t t-esc="o.lone_amount" /></span>
									<span style="padding-left:10px">订单总额:<t t-esc="o.order_amount_without_lone"/></span>
								</td>
							</tr>
						</tbody>
					</table>
					<div style="font-size:12px">
						<div style="width:33%;float:left">
							<span>负责人:<t t-esc="o.create_uid.name" /></span>
						</div>
						<div style="width:33%;float:left">
							<span>制单:<t t-esc="o.create_uid.name" /></span>
						</div>
						<div style="width:33%;float:left">
							<span>审核:</span>                        
						</div>
					</div>
					<!-- 增加应报人信息 -->
					<table class="table table-bordered" style="font-size:11px">
						<thead>
							<tr>
								<th>应报人</th>
								<!--
								<th>接点人</th>
								-->
								<th>银行账号</th>
								<th>会员编号</th>
								<th>备注</th>
							</tr>
						</thead>
						<tbody>
							<tr t-foreach="o.apply_person" t-as="p">
								<td style="width:20%;float:left"><span><t t-esc="p.name.name" /></span></td>
								<!--
								<td style="width:20%;float:left"><span><t t-esc="p.contact_person.name" /></span></td>
								-->
								<td style="width:20%;float:left"><span><t t-esc="p.name.bank_account" /></span></td>
								<td style="width:20%;float:left"><span><t t-esc="p.employee_number" /></span></td>
								<td style="width:20%;float:left"><span><t t-esc="p.note" /></span></td>
							</tr>
						</tbody>
					</table>
				</div>
				<div class="footer">
					<div style="border-top: 1px solid black;font-size:10px">
						<div>
							<div style="float:left;width:70%;">公司地址:<span>山东省烟台市福山区福桃路69#中青企业城8栋</span></div>
							<div style="float:left;width:30%">贷站咨询电话:<span>18660529729</span></div>
						</div>
						<div>
							<div style="float:left;width:70%">公司加盟热线:<span>400-090-3199</span></div>
							<div style="float:left;width:30%">贷站电话:<span>0535-4080190</span></div>
						</div>
						<div>
							<div style="float:right;width:30%">贷站传真:<span>0535-4080190</span></div>
						</div>
					</div>
				</div>
			</t>
		</template>

		<template id="jjt_sale_report">
			<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', 'jjt_scm.report_sale_order_jjt')" />
				</t>
			</t>
		</template>
	</data>
</dotop>



加载中
返回顶部
顶部