odoo11 report html显示格式跟pdf不一致
-
如下图片:
report
格式显示为qweb-html
的样子跟qweb-pdf
的不一样,有遇到的吗?
模板代码,纸张大小代码如下。
<div style="position:relative;float:left;"> <table style="border-collapse:collapse;table-layout:fixed;word-break:break-all;"> <tbody> <tr style="height:28px;"> <td rowspan="3" style="width:28px;"/> <td colspan="2" style="width:80px;"/> <td colspan="3" style="width:230px;"> <span t-field="docs.xx"/> </td> <td rowspan="3" style="width:28px;height:138px;"/> <td colspan="2" style="width:80px;"/> <td colspan="3" style="width:230px;"> <span t-field="docs.xx"/> </td> </tr> <tr style="height:28px;"> <td colspan="2"/> <td colspan="3"> <span t-field="docs.xx"/> </td> <td colspan="2"/> <td colspan="3"> <span t-field="docs.xx"/> </td> </tr> <tr style="height:28px;"> <td colspan="2"/> <td colspan="3"> <span t-field="docs.xx"/> </td> <td colspan="2"/> <td colspan="3"> <span t-field="docs.xx"/> </td> </tr> <tr style="height:30px;"> <td colspan="9"> <span t-field="docs.xx"/> </td> <td colspan="3"> <t t-foreach="docs._show_value()" t-as="one_money"> <div style="float:right;width:20px;margin-top:10px;display:table-cell;vertical-align:middle; text-align:center;"> <span t-esc="one_money"/> </div> </t> <div style="float:right;width:20px;margin-top:10px;display:table-cell;vertical-align:middle; text-align:center;"> <span>¥</span> </div> </td> </tr> <tr style="height:25px;"> <td colspan="12"/> </tr> <tr style="height:25px;"> <td colspan="10"/> <td colspan="2" style="vertical-align:top;"> <span t-field="docs.xx"/> </td> </tr> </tbody> </table> </div>
纸张大小:
<record id="paperformat_telegraphic" model="report.paperformat"> <field name="name">xx PaperFormat</field> <field name="default" eval="True"/> <field name="format">custom</field> <field name="page_height">85</field> <field name="page_width">175</field> <field name="orientation">Portrait</field> <field name="margin_top">15</field> <field name="margin_bottom">15</field> <field name="margin_left">0</field> <field name="margin_right">0</field> <field name="header_line" eval="False"/> <field name="header_spacing">0</field> <field name="dpi">90</field> </record>