Skip to content
Snippets Groups Projects
Commit c3377871 authored by Ricardo Gomes Rodrigues (rigr)'s avatar Ricardo Gomes Rodrigues (rigr)
Browse files

[IMP] account: harmonize the invoice creation in Documents and Accounting when...

[IMP] account: harmonize the invoice creation in Documents and Accounting when importing a PDF with embedded Factur-X data

Before this commit we had two different behaviour for the same functionnality depending on the App used.
In the Documents App:
- Upload a PDF document with embedded Factur-X in the Documents app
- Click on Create Bill in the actions of the document
- The OCR is triggered.

In the Accounting App:
- Upload a PDF document with embedded Factur-X via the "Upload Bills" button in the Accounting Dashboard
- The invoice is created using the information contained in the Factur-X XML embedded in the PDF without using the OCR.

We should have the same behaviour in both apps. Furthermore, if the invoice information can be retrieved from the XML, it is useless and more error-prone to use the OCR.

This commit fixes this by calling the Accounting importing function instead which also simplifies greatly the code

task-id 2961932

closes odoo/odoo#99247

Related: odoo/enterprise#30879
Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
parent de55cfa7
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment