跳至內容
選單
此問題已被標幟
1 回覆
3665 瀏覽次數

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
5月 21
2051
1
3月 24
2893
0
6月 22
2425
1
6月 24
2508
1
3月 22
3841