What I would like to do is to add a new option to Print invoices which would be Save locally, and it saves it on a shared folder on the server, how can I achieve this?
I am using Odoo V12 latest from git.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
What I would like to do is to add a new option to Print invoices which would be Save locally, and it saves it on a shared folder on the server, how can I achieve this?
I am using Odoo V12 latest from git.
Hi,
by default Odoo saves all printed attachments to your server, although they are hashed. Have a look for example at: https://www.odoo.com/groups/community-59/community-10744126. It is quite old, but the mechanics remains more or less the same.
If you want to put certain attachments to your cloud storage solution: have a look at this app - https://apps.odoo.com/apps/modules/12.0/cloud_base/
Cloud tools are nice, but it's a little bit too many features and expensive for non-profit use, that is why I just try to do this simple thing on exporting them on local share so others can access it.
How do I connect this Print button to a controller method? Let's say when we press Print that our method adds extra functionality to save it in folder and then call the super class method?
The point is that when you press 'print', Odoo already creates an attachment (ir.attachment instance) or use already existing one. So, you need either to find the attachment on your server as using the first link above; or to find it in Odoo and proceed your actions. If you want to re-write printing methods look at 'invoice_print' of account.invoice or 'report_action' and related method of reports
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Dec 20
|
1976 | ||
|
1
Nov 20
|
1978 | ||
|
0
Dec 24
|
30 | ||
|
1
Jun 24
|
663 | ||
|
3
Jan 23
|
1772 |