Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

method Onchange Odoo 8.0

By
yusuf
on 4/13/15, 9:59 AM 525 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

                                   

                                   }

                          

                        }



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

Ajeng Shilvie
on 4/13/15, 11:15 AM
1
Alby Antony
On 4/13/15, 11:34 PM

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. 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/13/15, 9:59 AM
Seen: 525 times
Last updated: 4/13/15, 11:34 PM