Odoo Help


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.


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

on 4/25/16, 7:42 AM 190 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"


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)


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