0
究竟是什麼錯?TypeError:_get_category()需要恰好6個參數(給出4個參數)
我試圖運行的代碼和我收到以下錯誤
我重視的回溯。
Server Traceback (most recent call last):
File "C:\Program Files (x86)\OpenERP 7.0-20141009-011214\server\openerp\addons\web\session.py", line 89, in send
File "C:\Program Files (x86)\OpenERP 7.0-20141009-011214\server\.\openerp\netsvc.py", line 296, in dispatch_rpc
File "C:\Program Files (x86)\OpenERP 7.0-20141009-011214\server\.\openerp\service\web_services.py", line 626, in dispatch
File "C:\Program Files (x86)\OpenERP 7.0-20141009-011214\server\.\openerp\osv\osv.py", line 190, in execute_kw
File "C:\Program Files (x86)\OpenERP 7.0-20141009-011214\server\.\openerp\osv\osv.py", line 132, in wrapper
File "C:\Program Files (x86)\OpenERP 7.0-20141009-011214\server\.\openerp\osv\osv.py", line 199, in execute
File "C:\Program Files (x86)\OpenERP 7.0-20141009-011214\server\.\openerp\osv\osv.py", line 187, in execute_cr
File "C:\Program Files (x86)\OpenERP 7.0-20141009-011214\server\.\openerp\osv\orm.py", line 1610, in default_get
TypeError: _get_category() takes at least 6 arguments (4 given)
def _get_category(self, cr, uid, ids, field_names, arg, context=None):
category_obj = self.pool.get('module.category').browse(cr, uid, category_id)
return {'value': {'category_id': category_obj.name}}
_name ='module.level'
_description ="Module Level"
_columns = {
'name':fields.char('Level', size=20),
'category_id':fields.function(_get_category,type='many2one',obj="module.category",method=True,string='Session'),
我想這還是同樣的問題 –
編輯與回溯你的問題編寫代碼。 –
我貼有traceback –