Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
2857 Widoki


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

                                   

                                   }

                          

                        }



Awatar
Odrzuć

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

Najlepsza odpowiedź

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. 

Awatar
Odrzuć