Odoo Help


TypeError: cannot convert dictionary update sequence element #0 to a sequence

on 4/25/16, 7:42 AM 857 views

im trying to create a site in alfresco with a python code ,the code itself works fine with static parameters but when i try to get the parameters from a wizard i got this error

# -*- coding: utf-8 -*-

from openerp.osv import fields, osv

import time

import requests

from json import JSONEncoder

class alfresco_passwordpass(osv.osv_memory):

_name = 'alfresco.passwordpass'

_columns = {

'name' : fields.char('alfrescoPwd2', size=30),

'visibility' : fields.char('alfrescoPwd3',size=30),

'description' : fields.char('alfrescoPwd4', size=30),


def create_site(self, cr, uid, ids,context=None):

s = requests.Session()

res_users_obj = self.pool.get('res.users')

listetest= res_users_obj.search(cr, uid, [], context=context)


data = {'username':res.login, 'password':res.x_alfrescoPwd}

url = ""

r = s.post(url, data=data)

if (r.status_code != 200) :

print "Incorrect login or password "

get_response = s.get('')

if (get_response.status_code != 200) :

print " authentification failed"



jsonString = JSONEncoder().encode({

"shortName": data.name,

"Visiblity": data.visibility,

"sitePreset": "site-dashboard",

"title" : data.name,

"description" : data.description


headers = {'content-type': 'application/json',"Accept":"application/json"}

site = s.post(url1,headers=headers,data=jsonString)

if (site.status_code != 200) :

print " Error while creating site"


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

1 follower(s)


Asked: 4/25/16, 7:42 AM
Seen: 857 times
Last updated: 4/25/16, 7:46 AM