Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5282 มุมมอง

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,
}

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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,
}



อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
เม.ย. 24
2062
0
ธ.ค. 19
4766
5
ธ.ค. 19
3831
0
ส.ค. 19
4
5
ส.ค. 19
2893