Commit f7a67152 authored by Boxiang Sun's avatar Boxiang Sun Committed by Eteri

erp5_officejs_support_request_ui: Publish the post when adding a post to a Support Request.

parent a098692e
...@@ -38,9 +38,9 @@ support_request.submit() ...@@ -38,9 +38,9 @@ support_request.submit()
# create an HTML Post # create an HTML Post
if description or file is not None: if description or file is not None:
post_module = portal.post_module post_module = portal.post_module
post_1 = post_module.newContent(portal_type='HTML Post') post = post_module.newContent(portal_type='HTML Post')
post_1.edit( post.edit(
start_date=now, start_date=now,
follow_up_value=support_request, follow_up_value=support_request,
text_content=description, text_content=description,
...@@ -54,12 +54,12 @@ if description or file is not None: ...@@ -54,12 +54,12 @@ if description or file is not None:
document = context.Base_contribute(**document_kw) document = context.Base_contribute(**document_kw)
# set relation between post and document # set relation between post and document
post_1.setSuccessorValueList([document]) post.setSuccessorValueList([document])
# depending on security model this should be changed accordingly # depending on security model this should be changed accordingly
document.publish() document.publish()
post.publish()
post_1.immediateReindexObject() post.immediateReindexObject()
support_request.immediateReindexObject() support_request.immediateReindexObject()
......
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 to comment