Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
3334 Visualizzazioni

Hi everyone, I recently migrated from version 11 to version 13 of odoo, my system is based on communication via REST API, so in the external interface I had given the possibility to download invoices, since I migrated to version 13 , I no longer have attachments, so I no longer have the id, how can I recreate them for all invoices?
Is there a method that allows me to recreate it?
Addition:
When from the backend of odoo I go to the invoice but it recreates it then I can download it from the frontend.

Avatar
Abbandona
Autore Risposta migliore

Ok solved (for now),

report = self.env['ir.actions.report']._ get_report_from_name('account.report_invoice_with_payments')


report.sudo().render(inv.id)


Only solution found at the moment, bad for performance. I will update you if there is any news, in the meantime I thank all the people who have answered me.

Avatar
Abbandona
Risposta migliore

Hi

make sure about your Old Server's Filestore must be copied on the Newly server.

Thanks 

Avatar
Abbandona
Autore

I can't

you can do it via SSH Access of your old server if you have it.

Autore

No and it would also be useless, when I do the POST in the REST, he goes to read the attachment, let's say I change the template, he would return the old one. My question is: is it possible to re-generate the pdf without creating the invoice? Maybe even with a cron

Risposta migliore

Did you also copy the filestore?

Avatar
Abbandona
Autore

No

Post correlati Risposte Visualizzazioni Attività
2
mag 25
750
2
nov 16
4290
1
mar 15
4096
0
ago 24
1273
0
giu 23
1787