Skip to content

Commit

Permalink
account_invoice_import: improve handling of simple PDF invoices
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexis-via authored and V3st1g3 committed Dec 11, 2024
1 parent 31e3825 commit 1c20b51
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 96 deletions.
2 changes: 1 addition & 1 deletion account_invoice_import_invoice2data/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Account Invoice Import Invoice2data",
"version": "14.0.1.0.1",
"version": "14.0.2.0.0",
"category": "Accounting/Accounting",
"license": "AGPL-3",
"summary": "Import supplier invoices using the invoice2data lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ msgstr ""
msgid "PDF Invoice parsing failed. Error message: %s"
msgstr ""

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:0
#, python-format
msgid ""
"This PDF invoice doesn't match a known template of the invoice2data lib."
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:product.product,uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,uom_name:account_invoice_import_invoice2data.internet_access_product_template
Expand Down
46 changes: 29 additions & 17 deletions account_invoice_import_invoice2data/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,38 @@ msgstr ""
msgid "<b>regular PDF</b> file without any embedded XML file via the"
msgstr "<b>reguläre PDF</b> Datei ohne eingebettete XML Datei per"

#. module: account_invoice_import_invoice2data
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import__display_name
msgid "Display Name"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import__id
msgid "ID"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:product.product,name:account_invoice_import_invoice2data.internet_access
#: model:product.template,name:account_invoice_import_invoice2data.internet_access_product_template
msgid "Internet Access"
msgstr "Internet Zugang"

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:57
#, python-format
msgid "PDF Invoice parsing failed. Error message: %s"
msgstr "PDF Rechnungsverarbeitung ist gescheitert. Fehler Meldung: %s"
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import____last_update
msgid "Last Modified on"
msgstr ""

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:60
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:0
#, python-format
msgid ""
"This PDF invoice doesn't match a known template of the invoice2data lib."
msgstr ""
"Diese PDF Rechnung entspricht keinem Template der invoice2data Bibliothek."
msgid "PDF Invoice parsing failed. Error message: %s"
msgstr "PDF Rechnungsverarbeitung ist gescheitert. Fehler Meldung: %s"

#. module: account_invoice_import_invoice2data
#: model:product.product,uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,uom_name:account_invoice_import_invoice2data.internet_access_product_template
msgid "Unit(s)"
msgstr "Einheit(en)"
msgid "Units"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:ir.model,name:account_invoice_import_invoice2data.model_account_invoice_import
Expand All @@ -57,12 +64,6 @@ msgstr "Assistent für den Import von Lieferantenrechnungen / -gutschriften"
msgid "invoice2data"
msgstr "invoice2data"

#. module: account_invoice_import_invoice2data
#: model:product.product,weight_uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,weight_uom_name:account_invoice_import_invoice2data.internet_access_product_template
msgid "kg"
msgstr "kg"

#. module: account_invoice_import_invoice2data
#: model_terms:ir.ui.view,arch_db:account_invoice_import_invoice2data.account_invoice_import_form
msgid ""
Expand All @@ -73,3 +74,14 @@ msgstr ""
"Bibliothek (liest den Text der PDF und erhält die Informationen). Dies "
"funktioniert nur, wenn die Bibliothek invoice2data eine Vorlage für die "
"Rechnungen dieses Lieferanten enthält."

#~ msgid ""
#~ "This PDF invoice doesn't match a known template of the invoice2data lib."
#~ msgstr ""
#~ "Diese PDF Rechnung entspricht keinem Template der invoice2data Bibliothek."

#~ msgid "Unit(s)"
#~ msgstr "Einheit(en)"

#~ msgid "kg"
#~ msgstr "kg"
28 changes: 15 additions & 13 deletions account_invoice_import_invoice2data/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,37 @@ msgstr ""
msgid "<b>regular PDF</b> file without any embedded XML file via the"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import__display_name
msgid "Display Name"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import__id
msgid "ID"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:product.product,name:account_invoice_import_invoice2data.internet_access
#: model:product.template,name:account_invoice_import_invoice2data.internet_access_product_template
msgid "Internet Access"
msgstr "Acceso a internet"

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:57
#, python-format
msgid "PDF Invoice parsing failed. Error message: %s"
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import____last_update
msgid "Last Modified on"
msgstr ""

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:60
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:0
#, python-format
msgid ""
"This PDF invoice doesn't match a known template of the invoice2data lib."
msgid "PDF Invoice parsing failed. Error message: %s"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:product.product,uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,uom_name:account_invoice_import_invoice2data.internet_access_product_template
msgid "Unit(s)"
msgid "Units"
msgstr ""

#. module: account_invoice_import_invoice2data
Expand All @@ -58,12 +66,6 @@ msgstr ""
msgid "invoice2data"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:product.product,weight_uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,weight_uom_name:account_invoice_import_invoice2data.internet_access_product_template
msgid "kg"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model_terms:ir.ui.view,arch_db:account_invoice_import_invoice2data.account_invoice_import_form
msgid ""
Expand Down
54 changes: 35 additions & 19 deletions account_invoice_import_invoice2data/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_import_invoice2data
# * account_invoice_import_invoice2data
#
msgid ""
msgstr ""
Expand All @@ -21,31 +21,38 @@ msgstr ""
msgid "<b>regular PDF</b> file without any embedded XML file via the"
msgstr "<b>normaal PDF</b> bestand zonder een geintegreerd XML bestand via de"

#. module: account_invoice_import_invoice2data
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import__display_name
msgid "Display Name"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import__id
msgid "ID"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:product.product,name:account_invoice_import_invoice2data.internet_access
#: model:product.template,name:account_invoice_import_invoice2data.internet_access_product_template
msgid "Internet Access"
msgstr "Internet Toegang"

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:57
#, python-format
msgid "PDF Invoice parsing failed. Error message: %s"
msgstr "Het is niet gelukt om de PDF factuur te verwerken. Fout melding: %s"
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import____last_update
msgid "Last Modified on"
msgstr ""

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:60
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:0
#, python-format
msgid "This PDF invoice doesn't match a known template of the invoice2data lib."
msgstr ""
"Deze PDF factuur heeft geen overeenkomstig herkennings sjabloon van de "
"invoice2data library."
msgid "PDF Invoice parsing failed. Error message: %s"
msgstr "Het is niet gelukt om de PDF factuur te verwerken. Fout melding: %s"

#. module: account_invoice_import_invoice2data
#: model:product.product,uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,uom_name:account_invoice_import_invoice2data.internet_access_product_template
msgid "Unit(s)"
msgstr "Stuk(s)"
msgid "Units"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:ir.model,name:account_invoice_import_invoice2data.model_account_invoice_import
Expand All @@ -57,16 +64,25 @@ msgstr "Hulp voor het importeren van inkoop / credit facturen"
msgid "invoice2data"
msgstr "invoice2data"

#. module: account_invoice_import_invoice2data
#: model:product.product,weight_uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,weight_uom_name:account_invoice_import_invoice2data.internet_access_product_template
msgid "kg"
msgstr "kg"

#. module: account_invoice_import_invoice2data
#: model_terms:ir.ui.view,arch_db:account_invoice_import_invoice2data.account_invoice_import_form
msgid "library (reads the text of the PDF and get the information). It will work only if the invoice2data library has a template for the invoices of that supplier."
msgid ""
"library (reads the text of the PDF and get the information). It will work "
"only if the invoice2data library has a template for the invoices of that "
"supplier."
msgstr ""
"bibliotheek (extraheert de teksten in de PDF voor het verkrijgen van de "
"informatie). Het werkt enkel wanneer er een sjabloon beschikbaar is voor de "
"betreffende leverancier."

#~ msgid ""
#~ "This PDF invoice doesn't match a known template of the invoice2data lib."
#~ msgstr ""
#~ "Deze PDF factuur heeft geen overeenkomstig herkennings sjabloon van de "
#~ "invoice2data library."

#~ msgid "Unit(s)"
#~ msgstr "Stuk(s)"

#~ msgid "kg"
#~ msgstr "kg"
38 changes: 22 additions & 16 deletions account_invoice_import_invoice2data/i18n/pt.po
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,37 @@ msgstr ""
msgid "<b>regular PDF</b> file without any embedded XML file via the"
msgstr "arquivo <b>PDF regular</b> sem qualquer arquivo XML incorporado via"

#. module: account_invoice_import_invoice2data
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import__display_name
msgid "Display Name"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import__id
msgid "ID"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:product.product,name:account_invoice_import_invoice2data.internet_access
#: model:product.template,name:account_invoice_import_invoice2data.internet_access_product_template
msgid "Internet Access"
msgstr "Acesso à Internet"

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:57
#, python-format
msgid "PDF Invoice parsing failed. Error message: %s"
msgstr "Análise de fatura PDF falhou. Mensagem de erro: %s"
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import____last_update
msgid "Last Modified on"
msgstr ""

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:60
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:0
#, python-format
msgid ""
"This PDF invoice doesn't match a known template of the invoice2data lib."
msgstr ""
"Esta fatura PDF não combina com um modelo conhecido do invoice2data lib."
msgid "PDF Invoice parsing failed. Error message: %s"
msgstr "Análise de fatura PDF falhou. Mensagem de erro: %s"

#. module: account_invoice_import_invoice2data
#: model:product.product,uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,uom_name:account_invoice_import_invoice2data.internet_access_product_template
msgid "Unit(s)"
msgid "Units"
msgstr ""

#. module: account_invoice_import_invoice2data
Expand All @@ -57,12 +64,6 @@ msgstr "Assistente para importar as faturas/créditos do fornecedor"
msgid "invoice2data"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:product.product,weight_uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,weight_uom_name:account_invoice_import_invoice2data.internet_access_product_template
msgid "kg"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model_terms:ir.ui.view,arch_db:account_invoice_import_invoice2data.account_invoice_import_form
msgid ""
Expand All @@ -72,3 +73,8 @@ msgid ""
msgstr ""
"biblioteca (lê o texto do PDF e obtém a informação). Apenas funcionará se a "
"biblioteca de invoice2data tiver um modelo para as faturas deste fornecedor."

#~ msgid ""
#~ "This PDF invoice doesn't match a known template of the invoice2data lib."
#~ msgstr ""
#~ "Esta fatura PDF não combina com um modelo conhecido do invoice2data lib."
39 changes: 23 additions & 16 deletions account_invoice_import_invoice2data/i18n/sl.po
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,37 @@ msgstr ""
msgid "<b>regular PDF</b> file without any embedded XML file via the"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import__display_name
msgid "Display Name"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import__id
msgid "ID"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:product.product,name:account_invoice_import_invoice2data.internet_access
#: model:product.template,name:account_invoice_import_invoice2data.internet_access_product_template
msgid "Internet Access"
msgstr "Internetni dostop"

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:57
#, python-format
msgid "PDF Invoice parsing failed. Error message: %s"
msgstr "Neuspešna obdelava PDF računa. Napaka: %s"
#: model:ir.model.fields,field_description:account_invoice_import_invoice2data.field_account_invoice_import____last_update
msgid "Last Modified on"
msgstr ""

#. module: account_invoice_import_invoice2data
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:60
#: code:addons/account_invoice_import_invoice2data/wizard/account_invoice_import.py:0
#, python-format
msgid ""
"This PDF invoice doesn't match a known template of the invoice2data lib."
msgstr ""
"Ta PDF račun se ne ujema z nobeno znano predlogo iz knjižnice invoice2data."
msgid "PDF Invoice parsing failed. Error message: %s"
msgstr "Neuspešna obdelava PDF računa. Napaka: %s"

#. module: account_invoice_import_invoice2data
#: model:product.product,uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,uom_name:account_invoice_import_invoice2data.internet_access_product_template
msgid "Unit(s)"
msgid "Units"
msgstr ""

#. module: account_invoice_import_invoice2data
Expand All @@ -60,16 +67,16 @@ msgstr "Čarovnik za uvoz prejetih računov/dobropisov"
msgid "invoice2data"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model:product.product,weight_uom_name:account_invoice_import_invoice2data.internet_access
#: model:product.template,weight_uom_name:account_invoice_import_invoice2data.internet_access_product_template
msgid "kg"
msgstr ""

#. module: account_invoice_import_invoice2data
#: model_terms:ir.ui.view,arch_db:account_invoice_import_invoice2data.account_invoice_import_form
msgid ""
"library (reads the text of the PDF and get the information). It will work "
"only if the invoice2data library has a template for the invoices of that "
"supplier."
msgstr ""

#~ msgid ""
#~ "This PDF invoice doesn't match a known template of the invoice2data lib."
#~ msgstr ""
#~ "Ta PDF račun se ne ujema z nobeno znano predlogo iz knjižnice "
#~ "invoice2data."
Loading

0 comments on commit 1c20b51

Please sign in to comment.