콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
459 화면

Hi there. I have this field in a list view. My goal is to have a fixed width for this column, so the image will not be cut if more fields are added to the list view.

<field name="image_1920" width="120px;" string="Image" widget="image" readonly="1" optional="show"/>

Now I am getting this error when opening the view: 

Odoo Client Error

UncaughtPromiseError > OwlError

Uncaught Promise > Invalid props for component 'ImageField': 'width' is not a number

Occured on localhost:8069 on 2025-08-02 15:36:41 GMT


Can anybody help? The weird thing is, it worked at first, but after a while I got the error. I removed it, changed it to the options attribute (works with resize, but gets cut off when more fields are added), then changed it back to width. Then it worked again for a while, now I get the error again. I have never seen such a behaviour.


Thank you.

아바타
취소
베스트 답변

Hii,

in odoo owl the width parameter for an image field must be passed as a number , not as a css string like 120 px

here is example 

<tree>

​<field name="name"/>

​<field name="image_1920" width="120" string="Image" widget="image" />

</tree>


i hope it is usefull

아바타
취소