Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
1259 Weergaven

hello everyone! anyone who can guide me how to convert the following code to odoo v17:


                                    {'required':[('lawyer_type','=','lawyer')]}                           

Avatar
Annuleer
Beste antwoord

it replace in odoo 17 attrs  to required="lawyer_type == 'lawyer'" and  invisible ="lawyer_type == 'lawyer'"

try this

Avatar
Annuleer
Beste antwoord

Hello Hamza,


I hope you're doing well.


Since Odoo 17.0, the "attrs" and "states" attributes are no longer used in the Odoo View architecture.

Instead, you can now use Python expressions that evaluate to a boolean for attributes like readonly, required, and invisible.


Old Code: {'required':[('lawyer_type','=','lawyer')]}

Migrated in V17.0: required="lawyer_type == 'lawyer'"


Kindly follow the document View architecture to understand the changes in odoo version 17.0

I hope this is helpful for you.

Thanks & Regards,

Email:   odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari 


Avatar
Annuleer
Beste antwoord

I guest this is in the xml, here is the converted code

required="lawyer_type == 'lawyer' "

Avatar
Annuleer

Hello remember my answer come first

Gerelateerde posts Antwoorden Weergaven Activiteit
0
aug. 25
310
1
jan. 25
1585
1
nov. 24
2018
2
sep. 24
1575
4
sep. 24
2363