Friday, March 14, 2025
1 change
New functionality added to Odoo
Brazilian POS users can now issue NFC-e fiscal receipts directly from the point of sale using Avatax. Sales continue even if electronic submission fails, with staff notified and able to retry later while providing a non-fiscal receipt fallback.
Original PR description
This module implements issueing NFC-e receipts through the POS. The process is conceptually similar to what we do for invoices. First taxes are calculated, and then we e-invoice. The calculated taxes…
This module implements issueing NFC-e receipts through the POS. The process is conceptually similar to what we do for invoices. First taxes are calculated, and then we e-invoice. The calculated taxes will never change the order total. NFC-e mandates taxes to always be included in the price so we don't need any additional RPC call before payment. One way of achieving this was through l10n_br_edi, forcing every pos.order to be invoiced and then following the implemented flows on account.move. We decided against it because: - It leads to a large amount of mostly unnecessary invoices, - It's conceptually strange to the user, NFC-e "invoices" resemble POS receipts more than they do invoices, - The flow in the POS is simpler, we handle tax calculation and EDI in one atomic step. We therefore chose to re-implement EDI for pos.order. The downside of this approach is that we temporarily need to copy some code from l10n_br_edi. In master this code can be consolidated in a common mixin. The integration tries to never block POS sales. You're allowed to retry EDI later. When EDI fails, the POS user is informed and we fall back to the standard receipt (marked as a "receipt without fiscal value"). For refunds we still go through account.move, as NFC-e doesn't support refunds (must be NF-e, which is what we already support for account.move). task-3564171