14 mig account invoice import invoice2data#14
Conversation
da49509 to
3d140f9
Compare
…edicated module account_invoice_import_invoice2data Update README.rst and headers to latest OCA conventions.
Better key names in the parsed_inv dict parsed_inv doesn't need to be JSON serializable anymore (small drawback: the invoice is parsed a second time on the second step... but the second step is rarely used)
Move code from account_invoice_import_invoice2data to account_invoice_import
Update REAME and some interface strings about UBL being an ISO standard Small code changes
…voice dict, cleaner organisation) Code refactoring: move code in base_business_document_import, factorise code for tax matching (it was duplicated in UBL and ZUGFeRD) Now support PDF with embedded UBL XML file Enable unittests on account_invoice_import_ubl More absolute xpath in account_invoice_import_ubl instead of relative xpath WARNING: these are big changes, I may have broken a few details
…te dir and the built-in templates Also allow to use only a local template dir README updated to explain how to configure all this
Special thanks to Sébastien Beau for his help to achieve this
Add support for partner bank matching on invoice update (before, it was only supported on invoice creation)
[FIX] LINT Use try/except when importing external libs Remove self.ensure_one() that has nothing to do in an api.model method
…a recent version of pdftotext on travis's ubuntu 12.04 images
Rename __openerp__.py to __manifest__.py and set installable to False
Also port all the modules that generate the XML documents: account_invoice_ubl, account_invoice_zugferd, purchase_order_ubl and sale_order_ubl
… module Fix spelling mistake and other remarks on README by Tarteo
* Update to work with latest version of invoice2data * Add requirements.txt file
Update the account_invoice_download_weboob following the changes in account_invoice_download Add README.rst for the 2 modules
Update text displayed in the invoice import wizard and make list of supported formats modular (like in bank statement import)
Updated by Actualizar ficheiros PO com o novo POT (msgmerge) hook in Weblate.
Currently translated at 85.7% (6 of 7 strings) Translation: edi-10.0/edi-10.0-account_invoice_import_invoice2data Translate-URL: https://translation.odoo-community.org/projects/edi-10-0/edi-10-0-account_invoice_import_invoice2data/pt/
Currently translated at 85.7% (6 of 7 strings) Translation: edi-12.0/edi-12.0-account_invoice_import_invoice2data Translate-URL: https://translation.odoo-community.org/projects/edi-12-0/edi-12-0-account_invoice_import_invoice2data/de/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: edi-12.0/edi-12.0-account_invoice_import_invoice2data Translate-URL: https://translation.odoo-community.org/projects/edi-12-0/edi-12-0-account_invoice_import_invoice2data/
Currently translated at 100.0% (9 of 9 strings) Translation: edi-12.0/edi-12.0-account_invoice_import_invoice2data Translate-URL: https://translation.odoo-community.org/projects/edi-12-0/edi-12-0-account_invoice_import_invoice2data/de/
Currently translated at 100.0% (9 of 9 strings) Translation: edi-12.0/edi-12.0-account_invoice_import_invoice2data Translate-URL: https://translation.odoo-community.org/projects/edi-12-0/edi-12-0-account_invoice_import_invoice2data/nl/
* [FEATURE] Invoice2data product line mapping * Change mapping fields * Move to account_invoice_import * Merge custom nline_match_product with nline_auto_product * Rename product_mapping to product_mapping_ids
* [FIX] Remove thousand separtor on parsing invoices * Change typo
3d140f9 to
bb8841f
Compare
* [FIX] Add ACL for invoice2data users * Add CRU on account_invoice_import_config * Return false after iterating through array instead of false negative on firs failure * Add user and editor access rights * Solve typo
bb8841f to
017d2ab
Compare
017d2ab to
ab50072
Compare
|
Thank you for your hard work! Unfortunately, this code is never going to be tested or run on any scale in our project. I don't feel comfortable proposing such a large change to an OCA module that has this lack of testing (we have underminded the stability of the queue_job module twice already this way). So I will abstain from reviewing this and I don't think we should propose this into the OCA. |
|
Created the OCA PR as discussed: OCA#399 |
bosd
left a comment
There was a problem hiding this comment.
Code review no functional test yet..
From what I remember, func test/code change is needed to be able to parse multiline products trough invoice2data module.
Previously it was not possible to have multi lines from the invoice2data module. But now it has been further developed and it supports multi line.
Odoo can be changed to accept multilines.
Some changes to the user messages..
[ help="The multi-line methods will not work for PDF invoices "
"that don't have an embedded XML file which has structured information "
"on each line.",](https://github.com/EssentNovaTeam/edi/blob
```/ab5007239a5ce6663a5fac2c70372507b7557e87/account_invoice_import/models/account_invoice_import_config.py#L34-L36)
The error message needs updating too:
https://github.com/EssentNovaTeam/edi/blob/ab5007239a5ce6663a5fac2c70372507b7557e87/account_invoice_import/wizard/account_invoice_import.py#L290-L295
change to something geneeric like
raise UserError(
_(
"You have selected a Multi Line method for this import "
"but there could no multi lines be extract/read from the supplied file."
)
maybe some code need adaptation as well.
| # @author Robin Conjour <r.conjour@essent.be> | ||
| # @author Pieter Paulussen <pieter.paulussen@dynapps.be> | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
| from openerp import fields, models |
| from tempfile import mkstemp | ||
|
|
||
| import pkg_resources | ||
| from openerp import _, api, fields, models |
| @@ -1,9 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <openerp> | |||
| import base64 | ||
|
|
||
| from openerp.tests.common import SavepointCase | ||
| from openerp.tools import config, file_open, float_compare |
There was a problem hiding this comment.
from odoo.tests.common import SavepointCase # or TransactionCase???
from odoo.tools import config, file_open, float_compare
| * 'amount_untaxed' or 'amount_tax' (one or the other, no need for both) | ||
| * 'date': the date of the invoice | ||
| * 'invoice_number' | ||
| * 'date_due', if this information is available in the text of the PDF file. |
There was a problem hiding this comment.
please include secntion about the product mapping feature. Which fields are accepted.
| [ | ||
| ("state", "=", "draft"), | ||
| ("type", "=", "in_invoice"), | ||
| ("supplier_invoice_number", "=", "562044387"), |
| f.close() | ||
| wiz.import_invoice() | ||
| # Check result of invoice creation | ||
| invoices = self.env["account.invoice"].search( |
| self.assertEquals(len(invoices), 1) | ||
| inv = invoices[0] | ||
| self.assertEquals(inv.type, "in_invoice") | ||
| self.assertEquals(inv.date_due, "2015-07-02") |
| inv = invoices[0] | ||
| self.assertEquals(inv.type, "in_invoice") | ||
| self.assertEquals(inv.date_due, "2015-07-02") | ||
| self.assertEquals(inv.date_invoice, "2015-07-05") |
| inv.partner_id, self.env.ref("account_invoice_import_invoice2data.free") | ||
| ) | ||
| self.assertEquals(inv.journal_id.type, "purchase") | ||
| self.assertEquals(float_compare(inv.check_total, 29.99, precision_digits=2), 0) |
There was a problem hiding this comment.
field check_total no longer available since v9, change to ???
No description provided.