Odoo Help

1 Answer

Jignesh Mehta

--Jignesh Mehta--
| 6 5 8
Surat, India
--Jignesh Mehta--

- I have 3+ years of Industry Experience, specializing Odoo Development, Analysis, Customization, Implementation, Integration.
- I have done many Customization modules in Sale, Purchase, Point of Sale, Inventory, CRM and much more. Also Worked in the Odoo Themes like Business Theme or E-Commerce Theme.
- Develop Jewelery Manufacturing process from Scratch. It have more than 10 Department. Develop PDF and Excel reports for this project around 150 per format.

Jignesh Mehta
1/9/18, 11:02 PM

Hello delgertsetseg,

Put button in the tree view and apply attrs on it.

You have to also add state field in the tree view because attrs on state field so you can invisible it.

For Ex:-


     <field name="state" invisible="1"/>

    <button name="add_workers" type="object" string="Add Workers" attrs="{'invisible' : [('state', '!=', 'draft')]}" confirm="Are You sure you want to Add Workers"/>


Hope it will works for you.


1/10/18, 12:10 AM

Thanks, i will try

1/10/18, 12:41 AM

"add_workorder" button is visible , do you have anything idea?

Jignesh Mehta
1/10/18, 12:53 AM

This attrs means, if state is not in draft stage then button is invisible. When the state is draft, button will visible. You want to hide button on draft state or only show button on draft state ?

Sudhir Arya (ERP Harbor Consulting Services)
1/10/18, 12:55 AM

AFAIK, attrs doesn't work on tree view.

1/10/18, 12:56 AM

Okey , I show button on only draft state

Ask a Question
Keep Informed
1 follower(s)
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.

Odoo Training Center

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

Test it now