"global name 'line' is not defined
-
当我设法使用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 ,
請可以问在数据库直接改嗎 ? -
请试着把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]]