Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
9463 Lượt xem

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

Ảnh đại diện
Huỷ bỏ

Have you found a solution?

Tác giả

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/

Tác giả

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 ?

Tác giả

@anuradha anywhere inside your <form> in xml view

Did it thanks

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

Tác giả

too bad not yet; cheers

@indira i added !!

Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 24
1681
1
thg 1 24
17065
0
thg 3 15
3340
1
thg 3 15
9988
1
thg 5 24
1524