Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Is there a way to hide buttons on a form when the form is in view mode? [Closed]

By
AJ Schrafel Paper Corp
on 6/26/13, 3:24 AM 1,732 views

The Question has been closed

by
AJ Schrafel Paper Corp
on 06/26/2013 16:52:18

I want to make is so that buttons in the form are not visible if the user is not editing the record.

What can I add to the XML to make a button in a form invisible if the user is not editing the record in form view?

4

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


Ahmed M.Elmubarak
On 6/26/13, 4:47 AM

Hello, you can add attribute to the button field

<button name = "name" type = "type" string = "string" class = "oe_edit_only"/>

I hope it'll work for you...

Regards...

Ahmed I use the Same code but not working, Here my code for ur reference .... <xpath expr="/form/header/button[@name='case_mark_won']" position="after"> <button name="case_mark_lost" string="Mark Lost" type="object" states="draft,open" class="oe_edit_only"/> </xpath>

Vikram
on 8/6/13, 6:38 AM

Hi, I have a similar code and it works fine... <xpath expr = "/form/header"> <button name = "compute_flight" string = "Compute" type = "object" class = "oe_highlight, oe_edit_only" states = "draft"/> ...

Ahmed M.Elmubarak
on 8/12/13, 5:34 AM
0
Ali Ravani
On 6/26/13, 4:36 AM

<button name="create" invisible="1"/>

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 6/26/13, 3:24 AM
Seen: 1732 times
Last updated: 3/16/15, 8:10 AM