跳至内容
菜单
此问题已终结
2 回复
2856 查看


hi all,

I wonder why every time I make a method onchange always out erorr " One of the documents you are trying to access has been deleted , please try again after refreshing . " syntax that I made like this

def onchange_mata_kuliah(self,cr,uid,ids, mata_kuliah_id,context={}):

        if mata_kuliah_id:

            mata_kuliah=self.pool.get('ta.daftar.hadir').browse(cr,uid,mata_kuliah_id)

            if mata_kuliah:

                return {

                          

                          'value':{

                                   'mata_kuliah_id':mata_kuliah.mata_kuliah_id.name,

                                   'prodi_id':mata_kuliah.prodi_id.id

                                   

                                   }

                          

                        }



形象
丢弃

hi , you have to declare return value in the end of your method

最佳答案

make sure that you have a many2one reference on the field "mata_kuliah_id" to some other table and that table have a field named "name".

if yes try with a different database. 

形象
丢弃