一、纸张格式设置:
<record id="paperformat_frenchcheck" model="report.paperformat"> <field name="name">French Bank Check</field> <field name="default" eval="True"/> <field name="format">custom</field> <field name="page_height">80</field> <field name="page_width">175</field> <field name="orientation">Portrait</field> <field name="margin_top">3</field> <field name="margin_bottom">3</field> <field name="margin_left">3</field> <field name="margin_right">3</field> <field name="header_line" eval="False"/> <field name="header_spacing">3</field> <field name="dpi">80</field> </record>
二、菜单按钮:
<report id="account_invoices" model="account.invoice" string="Invoices" report_type="qweb-pdf" name="account.report_invoice" file="account.report_invoice" attachment_use="True" attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')" />
三、Barcodes
<img t-att-src="'/report/barcode/QR/%s' % 'My text in qr code'"/>
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s'%('QR', 'text', 200, 200)"/> 二维码