[FIX] mail: revert upload_attachment fix
Cookies should be used internally by the web UI. The server-side is not supposed to be aware of it at all. Reverts: odoo#88745 Based on odoo#93812 discussion. It has been decided to revert the fix to avoid further unattended behaviours. closes odoo/odoo#100178 X-original-commit: bdde7dda7356744d459e3991a7f382fee42bf8c5 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
This commit is contained in:
@@ -174,9 +174,7 @@ class Binary(http.Controller):
|
||||
filename = unicodedata.normalize('NFD', ufile.filename)
|
||||
|
||||
try:
|
||||
cids = request.httprequest.cookies.get('cids', str(request.env.user.company_id.id))
|
||||
allowed_company_ids = [int(cid) for cid in cids.split(',')]
|
||||
attachment = Model.with_context(allowed_company_ids=allowed_company_ids).create({
|
||||
attachment = Model.create({
|
||||
'name': filename,
|
||||
'datas': base64.encodebytes(ufile.read()),
|
||||
'res_model': model,
|
||||
|
||||
Reference in New Issue
Block a user