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

Hello Community, 

I have been looking for the logic behind the 

class="o_some_name" or the class="oe_some_name"

class-attributes. When I do a full search of the odoo-code I can't find where the o_some_name or the oe_some_name are defined. I checked all the css-files and everything else. 

example in the sale_product_configurator/sale_product_configurator_views.xml:



It looks to me like it some glued together string that you have to separate to find what it does, but I haven't found the logic yet. 

Thanks in advance for the help. Greetings, 

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

Hi, 
those are properties that we add to elements in order to apply some changes to them. 
Basically, if only few element need a property we add style="..".. but when we want to apply it on many elements Or when we want to target an element in Js files, then we can add a class and all its properties will spread to all elements that have the class.

In your example, the classes are used in Js : sale_product_configurator/sale_product_configurator_views.xml

we have: o_sale_product_configurator_edit or o_sale_product_configurator_add

these classes are necessary and they are used in sale_product_configurator/static/src/js/product_configurator_renderer.js

hope this helps.

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

Thank you for you explanation.

المنشورات ذات الصلة الردود أدوات العرض النشاط
0
مايو 21
2051
1
مارس 24
2893
0
يونيو 22
2425
1
يونيو 24
2508
1
مارس 22
3841