Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
1268 Visualizzazioni

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


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

Avatar
Abbandona
Risposta migliore

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

try this

Avatar
Abbandona
Risposta migliore

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
Abbandona
Risposta migliore

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

required="lawyer_type == 'lawyer' "

Avatar
Abbandona

Hello remember my answer come first

Post correlati Risposte Visualizzazioni Attività
0
ago 25
311
1
gen 25
1587
1
nov 24
2018
2
set 24
1578
4
set 24
2365