Odoo Help

0

how to detect whether user is adding record or editing

By
Merlin TecSol Pvt. Ltd.
on 5/10/13, 3:51 AM 825 views

I need to detect when a user is in add (new) mode when the view is loaded or in edit mode.

I need this because I want to hide a few fields when the user is adding a new entry and show them when the user is editing an entry.

TIA

0

Vasiliy Birukov

--Vasiliy Birukov--
3491
| 7 6 8
Russian Federation
--Vasiliy Birukov--

Help develop and implement any project on base Odoo.

Vasiliy Birukov
On 5/10/13, 5:40 AM

Use invisible attribut with dynamic conditions. See for example:

<field name="field1"/>
<field name="field2" attrs="{'invisible':[('field1','=','some_value')]}"/>

field2 will show or not depended from value field1.

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

0 follower(s)

Stats

Asked: 5/10/13, 3:51 AM
Seen: 825 times
Last updated: 3/16/15, 8:10 AM