Odoo中文社区可以通过以下两个域名访问:shine-it.net , odoo.net.cn

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

【已解决】打印报表开发报错QWebTemplateNotFound



  • 想自定义销售的报价单、销售单格式,编写了如下的xml文件,现在在“打印”按钮下已经可以看到"二等份打印",但是当点击打印的时候就报错<br />

    <br />raise ValueError(&#039;External ID not found in the system: %s&#039; % (xmlid))<br />QWebTemplateNotFound: External ID not found in the system: youxiang.youxiang_halve_report_saleoder<br />
    

    <br />

    <br />&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />&lt;openerp&gt;<br />&nbsp; &nbsp; &lt;data&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;template id=&quot;youxiang_halve_report_saleoder&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;t t-call=&quot;report.html_container&quot;&gt;&nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;t t-call=&quot;report.external_layout&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;div class=&quot;page&quot;&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;h2&gt;Report title&lt;/h2&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/div&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/t&gt;&nbsp; &nbsp; &nbsp; &nbsp;  <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/t&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;/template&gt;<br />&nbsp; &nbsp; &nbsp; &nbsp; &lt;report id=&quot;youxiang_report_saleoder&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; model=&quot;sale.order&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string=&quot;二等份打印&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; report_type=&quot;qweb-pdf&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name=&quot;youxiang.youxiang_halve_report_saleoder&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; file=&quot;youxiang.youxiang_sale_report&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; /&gt;<br />&nbsp; &nbsp; &lt;/data&gt;<br />&lt;/openerp&gt;<br />
    


  • 已解决,感觉amos的qweb开发视频。<br />问题在于理解<report>标签内的name、file属性。<br />name:模块目录名称.报表模板(template)id<br />file:模块目录名称.报表模板(template)所在的文件名称<br /><br />