odoo/odoo#97637

Created by fw-bot
Merged at 9452da0de322703c9116f4c48a2503bde73d3add

Statuses:

label
odoo-dev:saas-15.4-15.0-opw-2925137-fix-admi-vNn0-fw
head
8b51d2445767b9e2eafe359d654f4a2693cd2897
merged
3 years ago by Accounting, Josse Colpaert (jco)
odoo/odoo
15.0 #97009
saas-15.2 #97613
saas-15.3 #97622
saas-15.4 #97637
16.0
17.0
18.0
saas-18.1
saas-18.2
saas-18.3
saas-18.4
master #97648

[FW][FIX] account_edi: documents of draft invoice no longer sent

How to reproduce the bug ?

  • install point_of_sale,l10n_mx_edi
  • In Point of Sale > Settings, add at least one Payment Methods
  • Still in Point of Sale > Settings, create one Point of Sale
  • In Point of Sale > Products > Products, select one product.
  • In the Accounting tab of the product, set the UNSPSC Category.
  • Go back on the dashboard of Point of Sale and start a new session.
  • Add the product you have selected before and go to calidate the
    invoice.
  • Pick a payment methode and a costumer and check the invoice option.
  • Validate the invoice.
  • Close the session and go to Point of Sale > Orders > Orders.
  • Click on the order you have just created and click on Invoice (in the
    top right corner).
  • Reset the invoice in draft.
  • Wait for the cron task to be executed or execute it manually.

What is the bug ?

The cron task that send all the edi documents doesn't consider the state
of the account_move linked to it. Because of that if an invoice poster
is reset to draft, it will have a document and this document will be
sent.

opw-2925137

Signed-off-by: Adrien Minet <admi@odoo.com>

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #97009