Odoo Help
Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Custom module form : It return 403 : forbiden after submit form
hi,
i created one custom module in odoo v9
in controller i am not pass any "auth" parameter
after login administrator in odoo it submit form and work perfectly
but when i create another user in odoo from signup form and try to submit form so it return 403:forbidden errore
in log file it look like
"
AccessError: (u'Sorry, you are not allowed to create this kind of document. Please contact your system administrator if you think this is an error.\n\n(Document model: consulate.afidavit)', None)
"
so how can i solve this error
Hi,
When you create you new object you should use:
request.env['..'].sudo().create('..');
In the old API you should use:
from openerp import SUPERUSER_ID
request.registry['...'].create(cr, SUPERUSER_ID, place.id, ..., context)
Then you are in the super user right.
Best Regards
hi,Thanks for your reply but in my controller i am not create any user,only get login user detail from "cust = http.request.env.user" and save in res.partner(onetomany) fields like "'partner_id': cust.id," it works in only when admin is logged in otherwise it return 403:forbidden error,so how we remove this error
About This Community
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now