コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
1276 ビュー

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


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

アバター
破棄
最善の回答

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

try this

アバター
破棄
最善の回答

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 


アバター
破棄
最善の回答

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

required="lawyer_type == 'lawyer' "

アバター
破棄

Hello remember my answer come first

関連投稿 返信 ビュー 活動
0
8月 25
311
1
1月 25
1591
1
11月 24
2019
2
9月 24
1579
4
9月 24
2373