How to extend the limit to 128 characters in the field "Save as Attachment Prefix" for Reports/Invoice pdf
Select an Edit Invoices pdf, the field "Save as Attachment Prefix" is limited to 128 characters !
How to extend it?
Rem: i use OpenErp version 7.0-20140804-231303
A fast way:
1) find a file:
2) in this file find the line, which is starts with:
'attachment': fields.char('Save as Attachment Prefix', size=128, help='This is the filename of the attachment used to ...
3) in that line, change size=128 to greather value you like, lets say: size=256, . then save and close the file.
4) restart openerp
5) in openerp, go to: "Settings/Modules/Installed Modules" page. find there module named "Base" and open it. When you open it, you'll see two buttons: "Upgrade" and "Uninstall". clikc on "Upgrade", then wait to upgrade process to be completed.
That's all, you're done.
However, this changes may be lost upon openerp update. the better way is to develop separated module for this purpose, inherit 'ir.actions.report.xml' class in it and override 'attachment' field thereby setting preferred size. and then install that module, instead of changing code in base module.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 9/12/14, 5:57 AM|
|Seen: 968 times|
|Last updated: 3/16/15, 8:10 AM|