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

时间:2019-03-28 09:14:32

标签: odoo odoo-10 odoo-11

我想将模块报告从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>

2 个答案:

答案 0 :(得分:1)

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

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

inherit_id="web.external_layout"

答案 1 :(得分:0)

你好,omas

可以请您输入以下代码:

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

我希望这对您有所帮助。 谢谢。