Sunday, March 12, 2023
1 change · master
Miscellaneous changes
If an invoice is sent to the Tax Agency, we should block the fact that the user can delete it. In that case, we can have issues when the tax agency sends back notifications. Current `l10n_it_edi` check doesn't take into consideration invoices reset to draft and that has caused some problem. Now we explicitly impede deletion of FatturaPA-like named attachments if the invoice has an `l10n_it_edi_transaction` value, even if they're not targeted by the `edi_document.` The `l10n_it_edi_transacti
Original PR description
If an invoice is sent to the Tax Agency, we should block the fact that the user can delete it. In that case, we can have issues when the tax agency sends back notifications. Current `l10n_it_edi` check doesn't take into consideration invoices reset to draft and that has caused some problem. Now we explicitly impede deletion of FatturaPA-like named attachments if the invoice has an `l10n_it_edi_transaction` value, even if they're not targeted by the `edi_document.` The `l10n_it_edi_transaction` value is reset when the invoice is rejected by the EDI so that case is still managed correctly. See: https://github.com/odoo/odoo/blob/14.0/addons/account_edi/models/ir_attachment.py#L14 Task link: https://www.odoo.com/web#id=3192962&model=project.task Task-3192962 Forward-Port-Of: odoo/odoo#114687 Forward-Port-Of: odoo/odoo#113079