Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] account_invoice_facturx: No data attached if invoice is sent per mail #1045

Open
alpha23 opened this issue Sep 30, 2024 · 1 comment
Labels

Comments

@alpha23
Copy link

alpha23 commented Sep 30, 2024

Module

account_invoice_facturx

Describe the bug

When I download an invoice via Print -> Invoices, the facturx data is correctly inserted into the PDF. If I want to send an invoice by e-mail, no data is inserted into the PDF. The attachment in the e-mail does not contain any facturx data.

How can I ensure that the invoices sent by e-mail contain the correct data?

Steps to reproduce the behavior:

  1. Install the modules account_einvoice_generate and account_invoice_facturx with the default settings
  2. compare the PDFs that are to be sent by mail and those that are to be printed

Expected behavior
The PDF in the mail attachment should include the facturx data

@alpha23 alpha23 added the bug label Sep 30, 2024
@alpha23
Copy link
Author

alpha23 commented Sep 30, 2024

When I go to Print -> Invoices, the variable “report_ref” in the method models/ir_actions_report.py:_render_qweb_pdf_prepare_streams is a string with the content “account.report_invoice_with_payments”. If I use the “Send & print” button, I get a model “ir.actions.report(202,)” for the variable. The check “and report_ref in invoice_reports” then fails with error: “UserWarning: unsupported operand type(s) for ‘==’: ‘ir.actions.report()’ == ‘’account.report_invoice_with_payments‘’”.

For now I solved it with:

if not isinstance(report_ref, str):
report_ref = report_ref.report_name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant