Hi All Can we have solution to do a field as mandatory through on_change?Please do reply as soon as Possible......
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
If i got your point right.. you want conditional requred fields...
For example when some field changes depending on value of that field other field is required, or hidden ... or something..
Yes, you can do that, trough view definition (example);
<field name="some_bool">
<field name="some_selection">
<field name="some_value" attrs="{'invisible':[('some_bool','=',True)], 'required':[('some_selection','=','some_sel_value)]} />
In this example view def you have conditional visibility, and conditional required field... no on_change needed
and if needed complex required check... you can write some method that returns True or False and call it instead of putting [()] conditions in brackets...
Hope this helps..
Thank for your Reply Friend It helped me lot Thank you So much
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire