Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3373 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Auteur

Thank you for you explanation.

Gerelateerde posts Antwoorden Weergaven Activiteit
0
mei 21
1804
1
mrt. 24
2615
0
jun. 22
2260
1
jun. 24
2110
1
mrt. 22
3606