This question has been flagged
1 Reply
7825 Views

Hi I am trying to create a Form for display only mode; so I need to hide all the headers or it's elements: bread crumbs, buttons (edit, create, more, delete, duplicate, next, previous) from the Form.

images and full question at stackoverflow: (i do not have enough karma to upload image, or embed url)

subject: OpenERP 7: Hide Whole Form Header or It's Elements

url:

stackoverflow.com/questions/17340190/openerp-7-hide-whole-form-header-or-its-elements

My questions:

  1. How to hide the Whole Form's header for Read Only mode?

  2. What is the best practice in OpenERP 7 to show form in read only mode?

Thank you

Avatar
Discard

Have you found a solution?

Author

nope; I have moved to other task. my plan was using javascript to set display:none to the header. kinda like http://kevin.deldycke.com/2013/03/openerp-61-web-javascript-hacks-hide-buttons/

Author

for now I just use CSS inside the form set display: none for the header; but I don't think this is secure. <style > .openerp .oe_view_manager table.oe_view_manager_header{display:none} </style>

@ indra where i have to write this code ?

Author

@anuradha anywhere inside your <form> in xml view

Did it thanks

@indira Do you know how to add header in tree view?

Author

too bad not yet; cheers

@indira i added !!

Best Answer

Found a way to remove 'Edit' and 'Create' buttons in form and disable deletion, with a hint from this answer:

In your form, add this:

<form string="Your string" edit="false" create="false" delete="false">

Perhaps some experiments or search through addons source code for examples could reveal a full solution for your problem.

Avatar
Discard