This question has been flagged
2 Replies
2498 Views


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

                                   

                                   }

                          

                        }



Avatar
Discard

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

Best Answer

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. 

Avatar
Discard