Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3345 Tampilan

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, 

Avatar
Buang
Jawaban Terbai

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.

Avatar
Buang
Penulis

Thank you for you explanation.

Post Terkait Replies Tampilan Aktivitas
0
Mei 21
1793
1
Mar 24
2606
0
Jun 22
2237
1
Jun 24
2100
1
Mar 22
3600