Внешний идентификатор не найден в системе: «report.external_layout_header» - PullRequest
0 голосов
/ 28 марта 2019

Я хочу перенести отчет модуля из odoo 10 в odoo 11, но кажется, что odoo 11 не содержит модуль в аддонах, называемый отчетом. Можете ли вы помочь мне и скажите, чем я могу его заменить.

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 ]

1 голос
/ 28 марта 2019

В Odoo11 модуль " report " интегрирован с модулем "web" .

Замените это report.external_layout_header на web.external_layout и не забудьте добавить «web» в вашу зависимость

inherit_id="web.external_layout"
0 голосов
/ 28 марта 2019

Здравствуйте, 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>```

Надеюсь, это поможет вам.Спасибо.

...