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

I want store image name when we browse for an image. For example While creating a product, when i browse for product image, odoo storing binart data of image in database. I want to grab the product image name when user browse product image is it possible?. I can override create and write methods of product_template table.

아바타
취소
베스트 답변

I  dont think you can retrive name of the image once it is saved to database, since binary decoding will concentrate more on content rather than the external data such as image name/size etc..

Alternate solution: Have an additional field for storing Image_name, so at the time of attaching the file, populate the name in the coressponding field... That way you can retrive it for further use....

아바타
취소
작성자

Thank you Deep, I have added extra field mid_image_name in product.template. My question is how can i populate that name in this field automatically. Can you please tell me the way to get that image name automatically to this mid_image_name field?

관련 게시물 답글 화면 활동
1
7월 25
1917
1
5월 20
3326
0
3월 20
3303
1
5월 19
4730
1
2월 16
4259