Commit b032edaf by Arturo Jasso Origel

se agrego una corección y unos logger de seguimiento

parent e65217a8
......@@ -403,10 +403,12 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk):
if 'portal_file' in request.params:
attached_files = request.httprequest.files.getlist('portal_file')
_logger.info(attached_files)
attachment_ids = []
for attachment in attached_files:
_logger.info(attachment)
result = base64.b64encode(attachment.read())
attachment_id = request.env['ir.attachment'].sudo(
).create({
'name': attachment.filename,
......@@ -415,7 +417,9 @@ class PortalHelpdeskMorsaSoporte(PortalHelpdesk):
'display_name': attachment.filename,
'datas': result,
})
_logger.info(attachment_id)
attachment_ids.append(attachment_id.id)
_logger.info(attachment_ids)
ticket_id.attachment_ids = [(6, 0, attachment_ids)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment