Odoo 12 报告在系统中找不到外部 ID:%s' % xmlid
Odoo 12 Report External ID not found in the system: %s' % xmlid
嗨,我想做的是在 odoo 12 中创建报告,这是我所做的:
首先我创建 toxicwork_invoice/reports/soreport.xml,代码如下所示:
<odoo>
<report
id="so_invoices"
model="salesorder.salesorder"
string="Invoices"
report_type="qweb-pdf"
name="salesorder.report_invoice"
file="salesorder.report_invoice"
/>
</odoo>
然后我创建 toxicwork_invoice/reports/invoice_card.xml,这是代码:
<odoo>
<template id="report_invoice_cards">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<h2>Faktur</h2>
</t>
</t>
</template>
<template id="report_invoice">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="report_invoice_cards"/>
</t>
</t>
</template>
</odoo>
但它给我这样的错误
raise ValueError('External ID not found in the system: %s' % xmlid) ValueError: External ID not found in the system: salesorder.report_invoice
我错过了什么?
请给出以下代码;
<odoo>
<report
id="so_invoices"
model="salesorder.salesorder"
string="Invoices"
report_type="qweb-pdf"
name="toxicwork_invoice.report_invoice"
file="toxicwork_invoice.report_invoice"
/>
</odoo>
<template id="report_invoice_cards">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<h2>Faktur</h2>
</t>
</t>
</template>
<template id="report_invoice">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="toxicwork_invoice.report_invoice_cards"/>
</t>
</t>
</template>
嗨,我想做的是在 odoo 12 中创建报告,这是我所做的:
首先我创建 toxicwork_invoice/reports/soreport.xml,代码如下所示:
<odoo>
<report
id="so_invoices"
model="salesorder.salesorder"
string="Invoices"
report_type="qweb-pdf"
name="salesorder.report_invoice"
file="salesorder.report_invoice"
/>
</odoo>
然后我创建 toxicwork_invoice/reports/invoice_card.xml,这是代码:
<odoo>
<template id="report_invoice_cards">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<h2>Faktur</h2>
</t>
</t>
</template>
<template id="report_invoice">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="report_invoice_cards"/>
</t>
</t>
</template>
</odoo>
但它给我这样的错误
raise ValueError('External ID not found in the system: %s' % xmlid) ValueError: External ID not found in the system: salesorder.report_invoice
我错过了什么?
请给出以下代码;
<odoo>
<report
id="so_invoices"
model="salesorder.salesorder"
string="Invoices"
report_type="qweb-pdf"
name="toxicwork_invoice.report_invoice"
file="toxicwork_invoice.report_invoice"
/>
</odoo>
<template id="report_invoice_cards">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<h2>Faktur</h2>
</t>
</t>
</template>
<template id="report_invoice">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="toxicwork_invoice.report_invoice_cards"/>
</t>
</t>
</template>