[IMP] l10n_it_edi_proxy: ack of the initial state is useless
When we receive status changes of sent invoices, we send an ack message to the proxy afterwards to indicate we received it correctly. However, as awaiting_outcome is the initial state for which no message about the invoice state was received from the gov, we do not need to ack it as it just says "we are still waiting for the first msg from the gov" In a scenario: Normal flow: - Odoo instance sends invoice to proxy, proxy to gov, which sends back transaction_id - On the proxy, the state of the transaction_id is awaiting_outcome - The gov sends a message back to the proxy that the invoice is approved (directly to the server), so the state becomes "approved" - The odoo instance asks for the status, receives the "approved" message and then tells the proxy he received it - The proxy deletes the "approved" message What we want to avoid: - Odoo instance sends the invoice - Proxy: awaiting_outcome - Odoo instance checks the status and the server returns "awaiting_outcome" - The gov sends a new message - The Odoo instance acks and says he received the msg (there is actually no message associated) - The new message from the government gets deleted. closes odoo/odoo#91608 X-original-commit: 7d992af9561c499ef1912453f3b697bad18e441f Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
@@ -218,7 +218,6 @@ class AccountEdiFormat(models.Model):
|
||||
'error': _('The invoice was sent to FatturaPA, but we are still awaiting a response. Click the link above to check for an update.'),
|
||||
'blocking_level': 'info',
|
||||
}
|
||||
proxy_acks.append(id_transaction)
|
||||
continue
|
||||
elif state == 'not_found':
|
||||
# Invoice does not exist on proxy. Either it does not belong to this proxy_user or it was not created correctly when
|
||||
|
||||
Reference in New Issue
Block a user