diff --git a/addons/share/web/editors.py b/addons/share/web/editors.py index 38e0e5e586f..6dce137ddaf 100644 --- a/addons/share/web/editors.py +++ b/addons/share/web/editors.py @@ -8,9 +8,9 @@ class FormEditor(openobject.templating.TemplateEditor): def insert_share_button(self, output): # Insert the share button on the form title H1 line, at the very end, # but only if the user is a member of the sharing group - share_opener_insertion = output.index( - '', - output.index(self.MAIN_FORM_BODY)) - 1 + share_opener_insertion = output.index('% endif', output.index( + '/view_diagram/process', + output.index(self.MAIN_FORM_BODY))) - 1 return output[:share_opener_insertion] + ''' <% if 'has_share' not in cp.session: