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

 I had something like the following in the view xml:

<field name="chart_file_name" readonly="1" invisible="1"/>
<field name="chart" widget="image" img_width="400" img_height="300" filename="chart_file_name"/>

The image resized as I expected with the image_width/img_height tags.  But the filename tag did not work.  When I did "Save image as" on Chrome, the default file name was "image.jpg".

Questions:

1. Is there a way to specify the default file name of the Save As dialog?
2. I found the "filename" tag in https://www.odoo.com/documentation/10.0/reference/views.html but not the image_width/img_height tags.  Did I go the the wrong document?

아바타
취소
작성자 베스트 답변

Thanks for your reply, Esther.

I need to clarify my question but somehow i was unable to save my changes to the original post.

Is there a way to specify the default file name of the Save As dialog (using the value of a different field "chart_file_name")?

Same default file name, "image.jpg", for all the downloads is kind of strange.

아바타
취소
베스트 답변

python is something like this?

chart_file_name = fields.Char(default='image.jpg')

아바타
취소
관련 게시물 답글 화면 활동
0
1월 22
3393
0
7월 19
2989
0
2월 25
4483
2
7월 17
11707
0
10월 15
3894