Odoo Help


Expected singleton

Ajeng Shilvie
on 12/20/14, 5:28 AM 21,128 views

i have a problem when executing a method ,

def wtc_approval(self, cr, uid, ids,vals, context=None):
        user = self.pool.get("res.users").browse(cr, uid, uid)['groups_id']
        line = self.browse(cr, uid, ids, context=context)
        for x in user:
            if line.app_line.group_id == x :
            print "adaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",x
        return True

it said


Expected singleton: wtc.approval.line(166, 167, 168, 169)

what should i do ?


If you use the list of Objects or List in the place of single value python will raise the error. Try use x.id instead of x. Also ensure that print line.app_line.group_id & print x.id should be single values(Not Links or Pointer).

on 12/20/14, 7:10 AM

Just an idea: def self.browse() ...

Med Said BARA
on 12/20/14, 10:09 AM

i suppose you are using V8 ?

Med Said BARA
on 12/20/14, 10:17 AM

Hi, please let me know if my answer helps you to solve the problem?

Baiju KS
on 12/22/14, 3:09 AM

Baiju KS

--Baiju KS--
| 5 5 8
Kochi, India
--Baiju KS--
ODOO technical

        I like learning new thing, especially technical thing. I am a quick learner, I can learn technical things very fast. I have good logical skill,  I have immense interest in programming.

e-mail id : baijuks@hotmail.com

Baiju KS
On 12/21/14, 10:40 AM


here you have to itereate line because it contains more than one record. Thats reason for Error

On 2/25/16, 2:07 PM

Hola resolvi el problema para esto dirigete a mi pagina ahi explico como hacer algo similar.


def onchange_get_organizer_account(self,auxType):

if auxType:

ids=self.env['gol.organizer.account'].search([['organizerType', '=', auxType]])


for item in ids:


print ids

print auxIds

return {'domain':{'organizerAccount':[('id','in',auxIds)]}}


def getCode(self):

if self.organizerAccount:


Para mayor informacion accede ami pagina eln la cual descrivo con mayor detenimiento


WHAT ? govorish pa Angliski tovorishch ?

Dr Obx
on 3/31/16, 4:30 AM

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

6 follower(s)


Asked: 12/20/14, 5:28 AM
Seen: 21128 times
Last updated: 3/31/16, 3:11 AM