-
-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0] account_invoice_import: allow to create empty invoices when nothing is extracted from the PDF #630
[14.0] account_invoice_import: allow to create empty invoices when nothing is extracted from the PDF #630
Conversation
Implement what is described in issue OCA#610: - account_invoice_import_simple_pdf and account_invoice_import_invoice2data can now be use d together - when importing an invoice for an unknown partner, it creates an empty invoice with PDF a s attachment - when importing an invoice via mail gateway and the from email is set on a partner that doesn't have any import config, create a supplier invoice with PDF as attachment and with that partner - when importing an invoice via mail gateway and the from email is set on a partner that has a single-line import config, create a supplier invoice with PDF as attachment, that partner and 1 invoice line with price_unit=0.
2b93b22
to
6c25de9
Compare
Travis is red. It is caused by the fact that my Bouygues Telecom test invoice that I shipped in account_invoice_import_simple_pdf also matches a template of invoice2data ! Now that the 2 modules are compatible, I should ship an invoice that will not match an invoice2data template. |
FIX import of XML files via mail gateway FIX attachment number in logs
I don't use the Bouygues Telecom test invoice in the test suite, because Bouygues Telecom also has an invoice2data template and invoice2data and simple_pdf are now compatible so both modules are installed during the test.
Can you add the feature to toggle the "To Check" value if an empty invoice is created? |
Cool, tests are green now! |
@bosd: ok, I'll have a look at it, but not today. |
@bosd When the invoice import doesn't match any partner, and you try to confirm it, you get the message "You need to add a line before posting." |
That makes sense. So it is not nedeed here. However it might be useful to add support of the to_check parameter for businesses_document_import. In case when product match fails. Or when a uom, tax is not correctly matched. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used in production, no code review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use this in production, very basic code review
/ocabot merge major |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 6ebc915. Thanks a lot for contributing to OCA. ❤️ |
… PDF invoices Restore implementation in OCA#630: - when importing an invoice for an unknown partner, it creates an empty invoice with PDF a s attachment
… PDF invoices Restore implementation in OCA#630: - when importing an invoice for an unknown partner, it creates an empty invoice with PDF a s attachment
… PDF invoices Restore implementation in OCA#630: - when importing an invoice for an unknown partner, it creates an empty invoice with PDF a s attachment
… PDF invoices Restore implementation in OCA#630: - when importing an invoice for an unknown partner, it creates an empty invoice with PDF a s attachment
Implement what is described in issue #610 :
d together
s attachment
on a partner that doesn't have any import config, create a supplier
invoice with PDF as attachment and with that partner
on a partner that has a single-line import config, create a supplier
invoice with PDF as attachment, that partner and 1 invoice line with price_unit=0.0