ValueError:系统中找不到外部ID:todo_report.report_todo_task_template

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

我试图将报告添加到应用程序但它没有工作并得到错误:

ValueError:系统中找不到外部ID:todo_report.report_todo_task_template

<?xml version="1.0" encoding="utf-8"?>
<odoo>
  <report id="action_todo_model_report" 
          string="To-do Report" 
          model="todo.task" 
          report_type="qweb-html" 
          name="todo_report.report_todo_task_template" />

  <template id="report_todo_task_template">
    <t t-call="web.html_container">
      <t t-call="web.external_layout">
        <div class="page">
          <div class="container">
            <div class="row bg-primary">
                <div class="col-3">name</div>
                <div class="col-2">start date</div>
                <div class="col-2">deadline</div>
                <div class="col-3">Gov</div>
                <div class="col-2"> amount </div>
            </div>
            <t t-foreach="docs" t-as="o">
              <div class="'row">
                <div class="col-3">
                  <h4><span t-field="o.name" /></h4>
                </div>
                <div class="col-2">
                  <span t-field="o.start_date" />
                </div>
                <div class="col-2">
                  <span t-field="o.deadline_date" />
                </div>
                <div class="col-3">
                  <span t-field="o.gov_dep_id" />
                </div>
                <div class="col-3">
                  <span t-field="o.amount" />
                </div>
              </div>
            </t>
          </div>
        </div>    
      </t>
    </t>
  </template>
</odoo>

这是浏览器显示它的消息

内部服务器错误 服务器遇到内部错误,无法完成您的请求。服务器过载或应用程序中存在错误。

我的错是什么?你怎么能帮帮我?

我在__manifest__中添加了报告作为数据

python odoo-12
1个回答
0
投票

请检查Odoo中是否存在“XML ID”,通过激活开发人员模式,然后激活设置 - >序列和标识符 - >外部标识符。在搜索栏中搜索“report_todo_task_template”,然后如果您只是点击它就会看到一条记录,然后从详细视图中复制整个ID。这对我有帮助,因为在创建模块时,我将“报告”复数形式设置为“报告”,以便您可以在“设置”中找到确切的ID。

© www.soinside.com 2019 - 2024. All rights reserved.