Files
odoo_source/addons/account/controllers
Anh Thao Pham (pta) 5326f4038b [FIX] account: fix invoice download from portal
Steps to reproduce:
- Install l10n_mx_edi
- Switch to a Mexican company (e.g. ESCUELA KEMPER URGATE)
- Create an invoice:
  * Customer: [a Mexican customer] (e.g. INMOBILIARIA CVA)
  * Product: [any product with UNSPSC Category set]
- Confirm the invoice
- Go to the portal preview of the invoice
- Download the invoice from portal

Issue:
1) On the invoice, the CFDI document has been generated and processed
without notice.
Downloading an invoice from portal should only download the invoice.

2) There are 2 buttons on the portal: "Download" and "Print".
The "Print" allows to print the invoice, even if it has not been
generated and sent yet.

Cause:
When downloading an invoice from portal, we are going through the
"Send & Print" wizard (without displaying it) with only "Download"
option checked.
However, some localization (e.g. MX) may add specific options that
are checked by default (e.g. CFDI), which triggers the corresponding
flow.

Solution:
1) Make sure that all options of "Send & Print" wizard are deactivated,
except "Download".
Download existing invoice documents or generate a temporary Pro Forma
document when downloading invoice from portal.

2) Remove "Print" button from portal view.

opw-3821371

closes odoo/odoo#159255

Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2024-04-02 15:40:24 +00:00
..
…