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

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

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

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

报表屡犯错误!



  • Environment Information :
    System : Windows-Vista-6.1.7601-SP1
    OS Name : nt
    Operating System Release : Vista
    Operating System Version : 6.1.7601
    Operating System Architecture : 32bit
    Operating System Locale : en_US.cp1252
    Python Version : 2.5.4
    OpenERP-Client Version : 5.0.3
    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
      File "service\web_services.pyo", line 629, in go
      File "netsvc.pyo", line 67, in init
    KeyError: u'report.product.backlabel1'

    \product_init_.py
    import report

    \product_terp_.py

    {
        "name" : "Products & Pricelists",
        "version" : "1.1",
        "author" : "Tiny",
        "category" : "Generic Modules/Inventory Control",
        "depends" : ["base", "process"],
        "init_xml" : [],
        "demo_xml" : ["product_demo.xml"],
        "description": """
        'update_xml': [
            'product_report.xml'
        ],
    }

    \product\product_report.xml
    <?xml version="1.0" encoding="utf-8"?>
    <openerp>
        <data>
    <report auto="False" id="product_backlabel1" model="product.product" name="product.backlabel1" rml="product/report/product_backlabel1.rml" string="Back Labels1"/>
        </data>
    </openerp>

    \product\report_init_.py
    import product_backlabel1

    \product\report\product_backlabel1.py

    import time
    from report import report_sxw

    class product_backlabel1(report_sxw.rml_parse):
        def init(self, cr, uid, name, context):
            super(product_backlabel1, self).init(cr, uid, name, context)
            self.localcontext.update({
                'time': time,
            })

    report_sxw.report_sxw('report.product.backlabel1','product.product','addons/product/report/product_backlabel1.rml',parser=product_backlabel1)



  • Environment Information :
    System : Windows-Vista-6.1.7601-SP1
    OS Name : nt
    Operating System Release : Vista
    Operating System Version : 6.1.7601
    Operating System Architecture : 32bit
    Operating System Locale : en_US.cp1252
    Python Version : 2.5.4
    OpenERP-Client Version : 5.0.3
    Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
      File "service\web_services.pyo", line 629, in go
      File "netsvc.pyo", line 67, in init
    KeyError: u'report.product.backlabel1'

    \product_init_.py
    import report

    \product_terp_.py

    {
        "name" : "Products & Pricelists",
        "version" : "1.1",
        "author" : "Tiny",
        "category" : "Generic Modules/Inventory Control",
        "depends" : ["base", "process"],
        "init_xml" : [],
        "demo_xml" : ["product_demo.xml"],
        "description": """
        'update_xml': [
            'product_report.xml'
        ],
    }

    \product\product_report.xml
    <?xml version="1.0" encoding="utf-8"?>
    <openerp>
        <data>
    <report auto="False" id="product_backlabel1" model="product.product" name="product.backlabel1" rml="product/report/product_backlabel1.rml" string="Back Labels1"/>
        </data>
    </openerp>

    \product\report_init_.py
    import product_backlabel1

    \product\report\product_backlabel1.py

    import time
    from report import report_sxw

    class product_backlabel1(report_sxw.rml_parse):
        def init(self, cr, uid, name, context):
            super(product_backlabel1, self).init(cr, uid, name, context)
            self.localcontext.update({
                'time': time,
            })

    report_sxw.report_sxw('report.product.backlabel1','product.product','addons/product/report/product_backlabel1.rml',parser=product_backlabel1)



  • \product\report_init_.py
    import import product_backlabel1


    错了.
    \product\report_init_.py
    import product_backlabel1  <-- 多了个 import

    2 \product\report\product_backlabel 1.py

    文件名错了.

    应该是 \product\report\product_backlabel1.py  而不是 \product\report\product_backlabel 1.py  <--- 多了个空格...



  • 非常感谢 shelly 老师, 对不起各位, 上边shelly 老师 提到的 问题 是我的笔误, 后来 shelly 老师指出 :

    shelly→水 5:32:11 PM
    所以, 有时候, 可能你的代码已经没有问题了. 但是因为模块更新出问题. 你的模块一样用不起来.

    在我重新启动电脑 又更新了一次 所有的 问题 都消失了!


登录后回复
 

与 Odoo 中文社区 的连接断开,我们正在尝试重连,请耐心等待