Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
1243 Представления

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

Related Posts Ответы Просмотры Активность
0
авг. 25
310
1
янв. 25
1582
1
нояб. 24
2010
2
сент. 24
1568
Odoo apps module Решено
4
сент. 24
2344