我在 Openerp 中创建了一个模块,它有以下文件: http ://pastebin.com/91RLuTQh
它可以工作,我将 _start_syncro 方法放入了调度程序中,但是每当我尝试运行它时都会出现一个奇怪的错误:
2013-02-04 10:01:40,658 6788 ERROR nagel_test openerp.addons.base.ir.ir_cron: Call of self.pool.get('res.partner')._start_syncro(cr, uid, *()) failed in Job 6
Traceback (most recent call last):
File "/opt/openerp/server/openerp/addons/base/ir/ir_cron.py", line 132, in _callback
method(cr, uid, *args)
File "/opt/openerp/server/openerp/addons/panda_partner/partner.py", line 57, in _start_syncro
csvrow[4] = csvrow[4].decode("utf-8")
IndexError: list index out of range
无论我做什么,它总是会在第 57 行准确地抛出一个错误!我不知道为什么。