تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
1701 أدوات العرض

The migration from 16 to 17 really tires me too much, here is another error


الصورة الرمزية
إهمال
أفضل إجابة

Hi,

In odoo 17 there is technical changes on usage of attrs .You can directly add condition for readonly, invisible,required in respected attribute.


Example:

<field name="amount_fix"
invisible="amount_select != 'fix'"
required="amount_select == 'fix'"
/>
<field colspan="4" name="amount_python_compute"
invisible="amount_select != 'code'"
required="amount_select == 'code"
/>
<field name="amount_percentage"
invisible="amount_select != 'percentage'"
required="amount_select == 'percentage'"
/>

Hope it helps.

الصورة الرمزية
إهمال
أفضل إجابة

Hello  BEKOIN ETIENNE,

There is syntax change in odoo 17,  Use != instead of <  >



I hope above solution will help you !

Thanks,
Vimal Rughani (Founder and CTO)
Himanjali Intelligent Automation Pvt Ltd
Contact:
 +91- 972-606-7737
Emailhello@himanjali.com 
NewsletterThe Odoo Scoop
Websitewww.himanjali.com


الصورة الرمزية
إهمال
أفضل إجابة

Hi,
use this script to make changes for attrs:  https://github.com/pierrelocus/odoo-attrs-replace

Odoo Attrs replacer

As Odoo changed the attrs to (no more attrs) in v17, I created this little script to help you replace all attrs in your XML files with corresponding attributes in the XML directly.

Thanks

الصورة الرمزية
إهمال
الكاتب

when I run the command it doesn't work

may i know what steps you followed to run it

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
نوفمبر 24
876
1
يوليو 24
967
4
يناير 25
2200
1
يونيو 24
1651
4
يونيو 25
1982