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

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

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

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

表单打印问题



  •       表单打印老是出现错误:(<type 'exceptions.KeyError'>, KeyError('report.rpt_after_sale_repair',), <traceback object at 0x02F544E0>)
          附上源文件:
        --ini--.py
       

    # -*- coding: utf-8 -*-<br />import rpt_after_sale_repair
    


       
       
          rpt_after_sale_repair.py
         

    # -*- coding: utf-8 -*-<br /><br /><br />import time<br />from report import report_sxw<br /><br />class rpt_after_sale_repair(report_sxw.rml_parse):<br />&nbsp; &nbsp; def __init__(self, cr, uid, name, context=None):<br />&nbsp; &nbsp; &nbsp; &nbsp; super(rpt_after_sale_repair, self).__init__(cr, uid, name, context=context)<br />&nbsp; &nbsp; &nbsp; &nbsp; self.localcontext.update({<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;time&#039;: time,<br />&nbsp; &nbsp; &nbsp; &nbsp; })<br /><br />report_sxw.report_sxw(&#039;report.rpt_after_sale_repair&#039;, &#039;crm.after.sale.repair&#039;, &#039;addons/crm_after_sale_repair/report/asr.rml&#039;, parser=rpt_after_sale_repair, header=Fales)<br />
    


         

          rpt_after_sale_repair_view.xml

         

    &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;report id=&quot;report_crm_after_sale_repair&quot; header=&quot;False&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; auto=&quot;False&quot; model=&quot;crm.after.sale.repair&quot; name=&quot;rpt_after_sale_repair&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rml=&quot;crm_after_sale_repair/report/asr.rml&quot; string=&quot;打印维修单&quot;/&gt;<br />&nbsp; &nbsp; &lt;/data&gt;<br />&lt;/openerp&gt;
    



          --openerp--.py
         

    &nbsp; &nbsp; &#039;update_xml&#039;: [<br />&nbsp; &nbsp; &nbsp; &nbsp; &#039;report/rpt_after_sale_repair_view.xml&#039;,<br />&nbsp; &nbsp;  ],
    



        求助~~~感谢!


  • 管理员

    请检查在模块根目录下的__init__.py有没有

    import report