https://www.odoo.com/documentation/12.0/reference/reports.html regard spécifique sur les documents officiels
Un des paramètres de format de papier:
<record id = "paperformat_frenchcheck" modèle = "report.paperformat" > <champ name = "nom" > banque française Check </ field> <champ name = "default" eval = "true" /> <champ name = « Format " > coutume </ field> <champ name = "page_height" > 80 </ field> <champ name = "page_width" > 175 </ field> <champ name = "orientation" >Portrait </ field> <champ name = "margin_top" > 3</ field> <champ name = "margin_bottom" > 3 </ field> <champ name = "margin_left" > 3 </ field> <champ name = "margin_right" > 3 </ field> <champ name = "header_line" eval = "False" /> <champ name = "header_spacing" > 3 </ field> <champ name = "dpi" > 80 </ field> </ record>
二,菜单按钮:
<Rapport
attachment_use = "false"
Modèle = "Produits.Nom du produit" Pour imprimer le module #
REPORT_TYPE = "Qweb-PDF"
ID = "print_product_menu_barcode"
String = "barre d'impression"
name = "product.print_template_barcode"
= Fichier « Produit. Print_template_barcode » Imprimer fichier #
PaperFormat = "product.paperformat_frenchcheck" # impression format papier
/>
Trois, Barcodes
< Img t-att-src = " '/ rapport / code barre / QR /% s' % 'Mon texte dans le code qr'" />
< Img t-att-src = " '/ rapport / code à barres /? Type =% s & value =% s & width =% s & hauteur =% s' % ( 'QR', 'texte', 200, 200)" />二维码
<? xml version = "1.0" encoding = "utf-8" ?> < Odoo > < données > < modèle id = "print_template_barcode" > < t t appel = "web.html_container" > < t t-foreach = "docs" t-as = "o" > < div class = "page" de style = "margin-top: 0px" > < le style de type = "text / css" > .gxtr> e { text-align: center; border-top: 1px solid # 000; border-left: 1px solid # 000; Border-bottom: 1px solid # 000; <- background-color: #BEBEBE; -> Font-size: 14px; } .gxtr> td { Border-bottom: 1px solid # 000; border-left: 1px solid # 000; border-right: 1px solid # 000; Font-size: 20px; afficher: flex; <! - text-align: center; -> } .gxtr> tr { Border-bottom: 1px solid # 000; border-left: 1px solid # 000; border-right: 1px solid # 000; Font-size: 20px; afficher: flex; text-align: center; } .herdtd { word-wrap: break-word; largeur: 22%;-size: 14px; } .gxdiv {border-left: 1px solid # 000; border-bottom: 1px solid # 000; à droite frontière: 1px solid # 000; font-size: 14px;} </ Style de > < t t appel = "web.basic_layout" > < table de largeur = "279" border = "1" > < thead > < tr > < td >名称</ td > < td > < durée T- champ = "o.name" /> </ td > < td rowspan = "3" > < img t-att-src = " 'width =% s & amp;; / rapport / code à barres / type =% s & amp;? valeur =% s & amp hauteur =% s' % ( 'QR', o.barcode, 100, 100)" /> </ td > </ tr > < tr > < td >价格 </ td > < td > < durée t-champ = "o.list_price" /> </ td > </ tr > < tr > < td >代码 </ td > < td > <durée t-field = "o.barcode"/> </ Td > </ tr > < tr class = "gxtr" > < e >测试1 </ th > < th colspan = "2" >测试值</ th > </ tr > </ thead > < tbody > < tr t-foreach = "o.attribute_line_ids" t-as = "att" class = "gxtr" > <td hauteur = "32" de style= "text-align: center;" > < Durée t-champ = "att.attribute_id.name" /> </ td > < td colspan = "2" de style = "text-align: center;" > < T t-foreach = "att.value_ids" t-as = "Val" > < durée t-champ = "val.name" /> ; </ T > </ td > </ tr > < t > </ div > </ t > </ t > </ modèle > </ données > </ Odoo >