Search code examples
odooodoo-10odoo-11

External ID not found in the system: "report.external_layout_header"


I want to migrate a module report from odoo 10 to odoo 11 but it seems that odoo 11 doesn't contain a module in addons called report. Can you help me and tell me with what I can replace it.

External ID not found in the system: report.external_layout_header" while parsing None:3, near
<data inherit_id="report.external_layout_header">
        <xpath expr="//div[@class='header']" position="replace">
            <div class="header">
                <div class="row zero_min_height">
                    <div class="col-xs-12">
                        <div style="border-bottom: 1px solid black;"/>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-6" name="company_address">
                        <span t-field="company.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}" style="border-bottom: 1px solid black; display:inline-block;"/>
                    </div>
                    <div class="col-xs-6 text-right">
                        <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/>
                    </div>
                </div>
            </div>
        </xpath>
    </data>```

Second error: Element '<xpath expr="//div[@name='customer_address']/div/div">' cannot be located in parent view

None" while parsing None:3, near
<data inherit_id="stock.report_delivery_document">
        <xpath expr="//div[@name='customer_address']/div/div" position="replace">
            <span t-if="o.picking_type_id.code=='outgoing'"><strong>Adresse Client:</strong></span>
            <span t-if="o.picking_type_id.code=='incoming'"><strong>Adresse Fournisseur:</strong></span>
        </xpath>
        <xpath expr="//h2" position="replace">
            <h2 t-if="o.picking_type_id.code=='outgoing'">
                Bon de livraison:
                <span t-field="o.name"/>
            </h2>
            <h2 t-else="">
                Bon de réception:
                <span t-field="o.name"/>
            </h2>
        </xpath>

Solution

  • Hello, omas

    Can you Please write the following code:

      <data inherit_id="web.external_layout_background">
        <xpath expr="//div[hasclass('o_background_header')]" position="replace">
            <div class="header">
                <div class="row zero_min_height">
                    <div class="col-xs-12">
                        <div style="border-bottom: 1px solid black;"/>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-6" name="company_address">
                        <span t-field="company.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;], &quot;no_marker&quot;: true}" style="border-bottom: 1px solid black; display:inline-block;"/>
                    </div>
                    <div class="col-xs-6 text-right">
                        <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 45px;"/>
                    </div>
                </div>
            </div>
        </xpath>
    </data>```
    

    I Hope this helps you. Thank you.