This question has been flagged
1 Reply
1870 Views

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
Discard
Best Answer

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
Discard
Author

Thank you for you explanation.