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

Hide buttons on workflow ?

By
Trai Doan
on 12/6/14, 10:13 AM 639 views

I have workflow with 4 states (new-negotiation-win-lost).In state win and lost ,i want to hide edit button - create button and more button .How can i do that?
Please help me ! Thank you :))

3

Baiju

--Baiju--
3154
| 5 4 8
Kochi, India
--Baiju--
ODOO technical and functional

        I like learning new thing, especially technical thing. I am a quick learner, I can learn technical things very fast. I have good logical skill,  I have immense interest in programming.

e-mail id : baijuks@hotmail.com

Baiju
On 12/7/14, 10:00 AM

HI Doan,

you can give attrs attribute to that field in xml file, or you can control access rights[if you don't want to give access to specified users]

I can give you an Example

If you want to make a filed invisible when state is in draft you can give attrs like this-

 attrs="{'invisible': [('state', '=', 'draft')]}"

If you have more than one condition -

 attrs="{'invisible': ['|',('state', '=', 'draft'), ('type','=','in_invoice')]}"  ==> here it is OR condition

1
Michael Pol
On 12/7/14, 10:28 AM

You can hide crete and edit buttons by giving access right to users to whom you dont want to show those options

1

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 12/8/14, 2:17 AM

Trai,  Edit, Create, and More button cannot be controlled like other buttons in the official Odoo.  One of the way to somewhat control it is to set the proper access right as Michael Pol has indicated.  But that means the user wouldn't have access at all to create or edit (modify) the data.  If you want to have a more granular control, you can specify Record Rules, where you can make user be able to Edit or Create with certain state (specified in the domain).  As for the More button, you cannot control it with configuration.  The Delete action, however, can be controlled in a similar fashion as Edit and Create button.  Duplicate will follow the configuration for Create.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

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

Question tools

1 follower(s)

Stats

Asked: 12/6/14, 10:13 AM
Seen: 639 times
Last updated: 3/16/15, 8:10 AM