Odoo Help

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 1,314 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--
3168
| 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)--
4440
| 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

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

2 follower(s)

Stats

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