odoo 给字段加颜色, 图片显示控制

<field name="operator" style="background:Blue;" attrs="{'readonly':[('state', '=', 'done')]}"/>

if you need to give color for your letters, then use style="color:Red;" 




ex: In Css file

.text_value_color {

    color: #052EF9;

}

In xml :

<field name="name" class="text_value_color"/>

 

 

============================================

控制图片显示

<style>
    .openerp .Your_custom_class > img { height: 6000px; width: 10000px; }
    .openerp .oe_form .oe_form_field_image img { max-width:656px; max-height: 1056px; }
</style>
<field name="picture" widget="image" class="Your_custom_class"/>



posted @ 2023-05-18 21:20  CrossPython  阅读(155)  评论(0编辑  收藏  举报