Odoo Help

0

Creating a user in res.partner error

By
tansadio
on 6/22/15, 7:12 AM 623 views

Hello, I would like to create a user with the email address in the res.partner object. But it gives me an error of the AccessError type: ('AccessError', u'Sorry, you are not allowed to create this kind of document.) Only users with the following access !!

i need your help



@http.route('/login/signup', type='http', auth="public")
def web_signup(self, **post):
obj_partner = http.request.env['res.partner']
email = 'toto@gmail.com'
# create partner
partner_id = obj_partner.create({
'name': ' ',
'email': email,
}

0
Temur
On 6/22/15, 7:48 AM

Try:

@http.route('/provencio/signup', type='http', auth="public")
def web_signup(self, **post):
obj_partner = http.request.env['res.partner']
email = 'estelle@gmail.com'
# create partner
partner_id = obj_partner.sudo().create({
'name': ' ',
'email': email,
}



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.

Register

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)

Stats

Asked: 6/22/15, 7:12 AM
Seen: 623 times
Last updated: 6/23/15, 4:51 AM