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

I'm currently using v 6.1. If i go to reports and fill field 'Save as attachment prefix' i. e. 'SO' next time i print this report it still has old name even after server restart. After investigation it appears that filename comes from Service name defined in report and this Service is registered each time you start the server. I tried to change this filename , even had success but the problem is that my code is rewriting report_name field each_time you print it and filename appears with one step back. Does anyone faced the same problem? Any help will be appreciated.

아바타
취소

how did you give the prefix name?

베스트 답변

having similar problem. the value from the field "Save as Attachment Prefix" is never used. Actually the PDF should also be persisted to the "Attachments", if a prefix is specified, but also this doesn't work.

my prefix for a Purchase Order is: ((object.name) + '_' + (object.state) + '_' + (time.ctime()) + ('.pdf'))

but I also tried a simple one like ('PO.pdf')

아바타
취소
베스트 답변

For pyhon shell syntax training, try this:

pyhon
>>> import time
>>> print "%s" % time.ctime()                               >>Sun Sep  7 22:05:46 2014
>>> print "%s" % time.ctime().split()[4]                >>2014
CTRL-D for quit shell

 

For attach pdf Sale Order in state 'progress' or 'manual' or 'done' with name 'SO001-2014.pdf', my prefix is:

(object.state in ('progress','manual','done')) and ((object.name or '').replace('/','')+'-'+ time.ctime().split()[4] +'.pdf')

 

 

아바타
취소

@Michel,

Thanks, your prefix helped me partially get where I wanted to go in 8.0, however i'd like to ask if you know if it is possible to create a custom filename in this manner for printing in Aeroo Reports.

What I would like to do is have the Document state (eg. PO), document number (eg. 123456), and then a date/timestamp of when it was printed (eg. 2015-04-18#11_45) as the filename. So in my example above:

PO_123456_2015-04-18#11_45.xls

I'm just getting to grips with Aeroo, and it's an awesome little reporting engine, but I haven't managed to figure out this one yet. If you have time, any insight or advice would be very appreciated.

베스트 답변

please try with something like this:

(object.state in ('draft','approved')) and ('RfQ_'+(object.name + '_' + time.ctime()).replace('/','')+'.pdf')

Regards

claudio

아바타
취소
베스트 답변

I had simmilar problem, and finaly foud it out to be a strange bug... On fist print the document name is rendered correct, and stored with correct name, but the file that is downloaded after fisrt rendering is having OLD name value, so the first time you download the attachment it has wrong filename. Also, after downloading, check the name of attachment (clicking on attachments button on top of document page and there the name of document shows up corectly)... 
Instead of rewriting javascript that downloads the document, i just discard the first download, and download it againg from attachment so it gets the desired filename.. 
 

 

아바타
취소
관련 게시물 답글 화면 활동
1
8월 25
652
1
4월 25
1621
1
9월 24
2319
1
7월 24
2075
1
5월 24
4550