Skip to Content
Menu
This question has been flagged

This is super important for many localizations.



Say you want to download XML from customer invoices for whatever reason but odoo doesn’t have a direct menu or simple interface, does it?

Well in fact you can do it!

Just keep in mind that it is not retroactive.


Original post (Spanish): https://www.odoo.com/es_ES/forum/ayuda-1/exportacion-de-varios-xml-de-facturas-de-cliente-216757

Remade for new localization improvements.

Avatar
Discard
Author Best Answer

First we will need to install the documents app and go to the settings, from there we will enable the following option:


Make sure to put it in a workspace that you recognize, the default one is called finances.


Yo will need to click in journals to select which documents will go where:

(The correct workspace in this example for customer invoices is Invoices and not the one in the pic)

After that go to documents settings> workspaces and create one workspace, in this case I called it PDFs:

I added invoices workspace as a parent but it is not necessary, however it is highly recommended.


After that we will need to activate debug mode (if you don’t know how to do this you can visit this link: https://www.odoo.com/documentation/17.0/applications/general/developer_mode.html)

And head to the workspace for invoices and we will click on the actions button:


And then we will create a new action:

We will name this action however we see fit, make sure it is related to the main workspace and change the condition to domain and add the mimetype equal to xml:

Remember that to see this you must have debug mode. You can also just copy this domain:

[("mimetype", "ilike", "xml")]


On the second tab “actions” just make sure that you set it to move to the xml workspace on “move to workspace”:


You can repeat this for PDF as well.

After that you just have to create invoices either download, send them by email or CFDI them.


By default both files will go to one workspace, the first one that it applies to.


After the documents are created you can go to the workspace and group by filetype and run the action we created previously.

These actions will only show up if the selected files are the correct filetype so it is foolproof.


After that you will have successfully stored and divided the invoicing files 🙂


You can always just have one folder to store both and just group by and it should be fine 🙂


And to massively download just select all the files and click on download:

And it will download a zip file containing all


Thanks 😀

Avatar
Discard
Best Answer

Hi,


I replicated this scenario but only the PDF's are moved into the invoices Workspace. the XML's are generated while sending out the invoice so I see them as an xml attachment but they are not visible in the documents application. Odoo V17


Avatar
Discard
Author

Hello, I've seen some localizations don't do this because they are coded differently, hopefully a full download option comes out soon :)

Hi,

Thanks for the quick response. We suspected something similar. We'll develop a small module that grabs all the attachments on the account.move records and download them as a zip.

Related Posts Replies Views Activity
1
Apr 23
3264
2
Sep 24
2924
1
Nov 23
2016
1
Apr 23
4234
2
Oct 24
2749