[FIX] sale: portal generates pdf for the chatter in a separate request
Steps to reproduce: - install studio, website and sales - go to sales > open studio > go to 'reports' > Quotation/Order - add a field anywhere on the report with the field expression set to "doc.signature" > save - go to sles > create a quotation > send by email > send > go to the customer portal - sign and send the quotation > go back to the edit mode > open the pdf attached to the latest message in the chatter Previous behavior: the custom field added was not rendered properly, the attachment is not available during the request and the generated pdf shows the placeholder image instead Current behavior: the message posted in the chatter is generated in another request, this makes the attachment available opw-2260989 closes odoo/odoo#54955 X-original-commit: a15cbb0a7be666d3ad438f6470d29cda75c24027 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -224,6 +224,7 @@ class CustomerPortal(CustomerPortal):
|
||||
'signed_on': fields.Datetime.now(),
|
||||
'signature': signature,
|
||||
})
|
||||
request.env.cr.commit()
|
||||
except (TypeError, binascii.Error) as e:
|
||||
return {'error': _('Invalid signature data.')}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user