Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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.
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:
>>> import time
>>> print "%s" % time.ctime() >>Sun Sep 7 22:05:46 2014
>>> print "%s" % time.ctime().split() >>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() +'.pdf')
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)...
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 7/30/13, 10:28 AM|
|Seen: 4258 times|
|Last updated: 8/31/15, 3:23 AM|