Odoo Help

0

Hide buttons on workflow ?

By
Trai Doan
on 12/6/14, 10:13 AM 851 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 KS
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
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.

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

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