提交 dfcc734f authored 作者: 贺阳's avatar 贺阳

打印改成横向的

上级 8e3149d6
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
<template id="report_palletlabel"> <template id="report_palletlabel">
<t t-call="web.html_container"> <t t-call="web.html_container">
<t t-set="barcode_size" t-value="'width:80mm;height:30mm'"/> <t t-set="barcode_size" t-value="'width:80mm;height:30mm'"/>
<t t-set="table_style" t-value="'width:100mm;height:150mm;'"/> <!-- 纵向的 -->
<!-- <t t-set="table_style" t-value="'width:100mm;height:150mm;'"/> -->
<!-- 横向的 -->
<t t-set="table_style" t-value="'width:150mm;height:90mm;'"/>
<t t-set="padding_page" t-value="'padding: 5mm'"/> <t t-set="padding_page" t-value="'padding: 5mm'"/>
<t t-set="pallets" t-value="pallets"/> <t t-set="pallets" t-value="pallets"/>
<t t-foreach="pallets" t-as="pallet"> <t t-foreach="pallets" t-as="pallet">
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<!-- 托盘标签纸张格式 --> <!-- 托盘标签纸张格式 纵向的 10x15cm-->
<record id="paperformat_pallet_label" model="report.paperformat"> <record id="paperformat_pallet_label" model="report.paperformat">
<field name="name">托盘标签 (10x15cm)</field> <field name="name">托盘标签 (10x15cm)</field>
<field name="default" eval="True"/> <field name="default" eval="True"/>
<field name="format">custom</field> <field name="format">custom</field>
<field name="orientation">Portrait</field> <field name="orientation">Portrait</field>
<field name="margin_top">0</field> <field name="margin_top">5</field>
<field name="margin_bottom">0</field> <field name="margin_bottom">0</field>
<field name="margin_left">0</field> <field name="margin_left">5</field>
<field name="margin_right">0</field> <field name="margin_right">0</field>
<field name="header_line" eval="False"/> <field name="header_line" eval="False"/>
<field name="header_spacing">0</field> <field name="header_spacing">0</field>
<field name="dpi">90</field> <field name="dpi">90</field>
<field name="page_width">100</field> <field name="page_width">100</field>
<field name="page_height">150</field> <field name="page_height">140</field>
</record> </record>
<!-- 托盘标签纸张格式 横向的 10x15cm-->
<record id="paperformat_pallet_label_landscape" model="report.paperformat">
<field name="name">托盘标签 (10x15cm) 横向</field>
<field name="default" eval="True"/>
<field name="format">custom</field>
<field name="orientation">Landscape</field>
<field name="margin_top">10</field>
<field name="margin_bottom">0</field>
<field name="margin_left">7</field>
<field name="margin_right">8</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">0</field>
<field name="dpi">90</field>
<field name="page_width">90</field>
<field name="page_height">140</field>
</record>
<!-- 托盘标签打印报告 --> <!-- 托盘标签打印报告 -->
<record id="action_pallet_label_report" model="ir.actions.report"> <record id="action_pallet_label_report" model="ir.actions.report">
<field name="name">托盘标签</field> <field name="name">托盘标签</field>
...@@ -24,7 +42,7 @@ ...@@ -24,7 +42,7 @@
<field name="report_type">qweb-pdf</field> <field name="report_type">qweb-pdf</field>
<field name="report_name">ccs_pallet.report_palletlabel</field> <field name="report_name">ccs_pallet.report_palletlabel</field>
<field name="report_file">ccs_pallet.report_palletlabel</field> <field name="report_file">ccs_pallet.report_palletlabel</field>
<field name="paperformat_id" ref="paperformat_pallet_label"/> <field name="paperformat_id" ref="paperformat_pallet_label_landscape"/>
<!-- <field name="binding_model_id" ref="model_cc_pallet"/> --> <!-- <field name="binding_model_id" ref="model_cc_pallet"/> -->
<field name="binding_model_id" eval="False"/> <field name="binding_model_id" eval="False"/>
<field name="binding_type">report</field> <field name="binding_type">report</field>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论