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

How to upload image in custom window in form view while creating new record and viewing the image after the saving record ?

아바타
취소
베스트 답변

In Python create Image field:-

_name = "table.name"

_columns = {

    'image': fields.binary("Image",help="This field holds the image"),

}

In XML Form view define:-

<field name="image" widget="image" />

아바타
취소
베스트 답변

Hi, 

Please i want to know How i can save the image in the database?

Thanks!

아바타
취소
베스트 답변

you can use option atribute for custom preview of the image.


<field name="image" widget='image' options="{'preview_image': 'image_small', 'size': [30, 30]}"/>

아바타
취소