Odoo 中文社区

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

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

    由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

    本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

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

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

    "global name 'line' is not defined

    Odoo 新手求助
    2
    3
    6305
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kalmenchia last edited by

      当我设法使用Purchase Order -> Approved by Supplier ,
      它投掷了这个错误信息,

      global name 'line' is not defined

      Traceback (most recent call last):
      File "netsvc.pyo", line 200, in _dispatch
      File "serviceweb_services.pyo", line 360, in exec_workflow
      File "osvosv.pyo", line 129, in exec_workflow
      File "osvosv.pyo", line 122, in exec_workflow_cr
      File "workflowwkf_service.pyo", line 86, in trg_validate
      File "workflowinstance.pyo", line 53, in validate
      File "workflowworkitem.pyo", line 64, in process
      File "workflowworkitem.pyo", line 161, in _split_test
      File "workflowworkitem.pyo", line 169, in _join_test
      File "workflowworkitem.pyo", line 48, in create
      File "workflowworkitem.pyo", line 64, in process
      File "workflowworkitem.pyo", line 161, in _split_test
      File "workflowworkitem.pyo", line 169, in _join_test
      File "workflowworkitem.pyo", line 48, in create
      File "workflowworkitem.pyo", line 57, in process
      File "workflowworkitem.pyo", line 118, in _execute
      File "workflowwkf_expr.pyo", line 87, in execute
      File "workflowwkf_expr.pyo", line 83, in _eval_expr
      File "<string>", line 1, in <module>
      File "workflowwkf_expr.pyo", line 43, in call
      File "osvosv.pyo", line 92, in execute_cr
      File "C:Program Files (x86)TinyERP Serveraddonspurchasepurchase.py", line 195, in action_invoice_create
      NameError: global name 'line' is not defined

      并且我無法进行,任何想法?
      我用的版本是4.2.2 , winXp Prof. Sp2 , Postgres 8.2 ,
      請可以问在数据库直接改嗎 ?

      1 Reply Last reply Reply Quote 0
      • digitalsatori
        digitalsatori 管理员 last edited by

        请试着把C:Program Files TinyERP Serveraddonspurchase目录下的purchase.py在195行的下述代码:
        [quote]raise osv.except_osv('Error !', 'There is no expense account defined for this product: "%s" (id:%d)' % (line.product_id.name, line.product_id.id,))[/quote]
        改为:
        [quote]raise osv.except_osv(_('Error !'), _('There is no expense account defined for this product: "%s" (id:%d)') % (ol.product_id.name, ol.product_id.id,))[/quote]
        不过,不管如何,Tiny实际上要告诉你“有某个产品没有定义”费用科目“(expense account).

        [[i] 本帖最后由 digitalsatori 于 2008-8-5 20:16 编辑 [/i]]

        【上海先安科技】(tony AT openerp.cn)

        1 Reply Last reply Reply Quote 0
        • First post
          Last post