系统中找不到外部ID:“report.external_layout_header”

问题描述 投票:0回答:2

我想将模块报告从odoo 10迁移到odoo 11,但似乎odoo 11不包含名为report的插件中的模块。你能帮助我并告诉我我可以取代它的东西。

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>
odoo odoo-10 odoo-11
2个回答
0
投票

你好,奶奶

你能写下面的代码:

  <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>```

我希望这可以帮助你。谢谢。


1
投票

在Odoo11中,“报告”模块与“web”模块集成在一起。

将此report.external_layout_header替换为web.external_layout,不要忘记在依赖项中添加“web”

inherit_id="web.external_layout"
© www.soinside.com 2019 - 2024. All rights reserved.