Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4333 Vizualizări

Am trying to define a method that calculates the amount for each line of purchase like this :

def _myMethod():
    res = {}
    for x in self.browse(cr, uid, ids):
        res[bo] = x.value * xyz 
    return res

And it is giving me a NameError. Please does anyone know why am getting this error and how to fix it.

Thank you

Imagine profil
Abandonează
Cel mai bun răspuns
def _myMethod():
    res = {}
    for x in self.browse(cr, uid, ids):
        res[x.id] = x.value * xyz 
    return res

apart from this what are the arguments of def _myMethod():

Cheers,

Parthiv

Imagine profil
Abandonează
Autor

Thanks Parthiv, this was helpful

You are welcome :)