İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
2116 Görünümler

How to create new report layout

Avatar
Vazgeç
En İyi Yanıt

If you want to create a new report layout that you select and customize in the 'Configure your document layout' wizard you can follow the steps provided in the following blog post:

Crafting custom document layouts in Odoo: A step-by-step guide

I hope this helps!

Avatar
Vazgeç
En İyi Yanıt

Hi,

Try this code

<template id="custom_report_external_layout">
<t t-call="web.html_container">
    <t t-if="not o" t-set="o" t-value="docs"/>
    <t t-set="company" t-value="company_id"/>
    <div class="header">
        <div style="border-top: 1px solid black;">
<img t-if="o.company_id.logo" t-att-src="image_data_uri(o.company_id.logo)" alt="Company Logo"
                 class="float-left"/>
<div style="font-size:14px;text-align:right;" class="float-right">
                <div>
<strong t-field="o.company_id.partner_id.name"/>
<span t-field="o.company_id.partner_id"
t-options="
{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;], &quot;no_marker&quot;: true}"/>
<span t-field="o.company_id.partner_id.website"/>
                </div>
            </div>
        </div>
    </div>
    <div class="footer">
        <div class="text-center" style="border-top: 1px solid black;">
            <ul class="list-inline">
<li t-if="o.company_id.phone">E-mail:
                    <span t-field="o.company_id.email"/>
                </li>
            </ul>
        </div>
    </div>
</t>
</template>

Please refer to the blog given below:


https://www.cybrosys.com/blog/how-to-create-new-report-layouts-in-odoo-16


Hope it helps

Avatar
Vazgeç