Hello
I'm using odoo version 11
I am writing a module which makes a panel for designers who are going to sell their designs.
while submitting a form, and adding a new design to the related model, it's fine by the admin user, but for other users i get the following error:
Access Denied by ACLs for operation: create, uid: 8, model: design.file
and design.file is my model name
and then it says:
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: design.file) - (Operation: create, User: 8)', None)
here is my controller code:
@http.route('/someurl', type='http', auth="user", methods=['POST'], website=False)
def upload_handle(self, **post):
post.get('picture')
vals = {
'design_name': post.get('design_name'),
'design_type': post.get('design_type'),
'file_type': post.get('file_type'),
'DPI': post.get('dpi'),
'file_orientation': post.get('file_orientation'),
'width': post.get('width'),
'height': post.get('height'),
# 'image_file': post.get('picture')
}
design_model = http.request.env['design.file']
design_model.create(vals)
return request.render('designer_panel.file_uploaded_successfully', lazy=True)