SaleOrder as PDF attachement fatal error

Guys,
I am facing an issue while trying to use an email template to send PDF quote report by mail.

I was able to create the template and add string code.
This works and i am able to send the email.

The proof:






But if i want to add the PDF report as attachment in the template and try to send an email, there is an error:




I am on AXELOR 7.2.5 (dev) commit 6fa5157.

@PakMax @siddique if you have an idea please, i am struggling since hours now.

1 « J'aime »

Can you translate or change language :slightly_smiling_face:

Hello @claudiucotan

As per the log you have shared, Issue is in generating the report from BIRT. it’s not able to generate the file successfully.
So can you cross check once again the parameter you have specified for your BIRT is matching what you have passed from your BIRT template or everything is properly working in BIRT or not or you can share your template details if possible.

Thank you.

Dear @siddique thank you for you prompt answer.

Please find the english version:

This works (without attachment):






This not (PDF report as attachment):





Dear @rch-axelor thank you for your help.
I did not modified any BIRT related files.


SaleOrder.rptdesign

Hello @claudiucotan

Two possibilities can be there

  • Make sure you have one Default mail account (I guess you have as you have sent other mail successfully. but still just for cross checking)
  • Main and most important thing (I can say as per your log) Need to pass each and every required parameter. So As you didn’t modify anything in BIRT template, There are two modification required in BIRT template parameters.
    1. Pass false as ProformaInvoice parameter (Or It can be passed dynamically instead of specify static in template by keeping that value in context of Sale order view.)
    2. Make sure you have specified printingSettings in specified sale Order (or you can pass static values for the parameter in which printingSettings has been used like pdfHeaderHeight, pdfFooterHeight, addressPositionSelect)

Hope this will resolve your issue.
Let us know the updates.

Thanks

1 « J'aime »

Dear @rch-axelor, again thank you for your prompt answer.
So i switched from this :

To this:

And now it works ! Thanks !!!




However, now,one question remains:
Whats is this « ProformaInvoice » parameter for?
And why isn’t working by default? Is this an issue?
Do i need to open an issue on Github?

Hello

Proforma generally used to indicate estimated report. If we print the report from java code or xml action, we pass that boolean according to the request. But as it’s auto generated for mail purpose need to pass from template parameter. It can be passed dynamically instead of specify static in template by keeping that value in context of Sale order view.

Thank you

1 « J'aime »

@rch-axelor Thanks for you answer, however, i did not understood anything :slight_smile:

Salut.

L’idée que je me fait de la situation :

la facture est un document officielle, qui ne doit pas être modifée. Ou, si vraiment une modification a besoin d’être faite, un nouvel exemplaire officiel peut-être créé, mais les documents doivent laisser des traces de création (obligation comptable).

L’envoi du document par email necessiterai de récupérer le bon PDF, et donc de faire un liens vers le pdf, et ne pas d’utiliser la génération de document en tant que fonction d’une pièce jointe (comme c’est le cas ici).

Contrairement à la facture, la facture pro-format est un document moins officiel, utilisée pour faciliter les démarches administratives ou financières. La facture pro-format peut donc être facilement être re-générée à de multiple reprise. C’est la méthode BIRD appliqué à chaque fois.

Pour rappel, Axelor propose l’envoie automatique des factures lors de leur ventilation.

Et pour pointer du doigt un bug (peut-être résolu, j’ai tjs une ancienne version), de la génération de bons de livraison (BL) - qui ne se stock pas comme les factures lors de leur validation.
Si je génère à nouveau mes BL, 1 ou 2 jours après, ils ont automatiquement la date du jour, et non pas celle de la validation.
À la lecture du BL, on considére la date principale comme la date d’expédition or ce n’est pas le cas; ce qui rend mes documents non pertinent pour le suivi client.

Ce sujet a été automatiquement fermé après 30 jours. Aucune réponse n’est permise dorénavant.