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

How to hide and show a field based on the edit mode or view mode?

By
salman
on 3/29/15, 3:35 AM 934 views

How to hide and show a field based on the edit mode or view mode in odoo for example I want to show a field in one2many tree when the user click on edit or create button hide the field when the user click on save button view?


Your help is really appreciated

0

Ahmed M.Elmubarak

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


Ahmed M.Elmubarak
On 3/29/15, 6:22 AM

Hello,

To make the field appear only on edit/create you can use:

<field name="name" class="oe_edit_only"/>


Regards...

0

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--
2993
| 3 2 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 3/29/15, 6:21 AM

Hello

You can use the class oe_edit_ony


<div class="oe_edit_only">
  <field name="your_field/>
</div>


Take a look in res partner form, where "Is a company" is using this class !

0
salman
On 3/29/15, 8:01 AM

Thanks but class="oe_edit_only" is not working when the field is in the one2many field  it will only disable it

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

2 follower(s)

Stats

Asked: 3/29/15, 3:35 AM
Seen: 934 times
Last updated: 3/29/15, 8:24 AM