diff options
| author | Benjamin Frantzen (bfr) <bfr@odoo.com> | 2021-02-04 08:36:09 +0000 |
|---|---|---|
| committer | Benjamin Frantzen (bfr) <bfr@odoo.com> | 2021-02-05 09:47:01 +0000 |
| commit | 8435d0e8990509ee67425977f970ab27bea8133a (patch) | |
| tree | 41e81317997cc9559cf3f0c66a5d05c68d91f302 /addons/account/wizard | |
| parent | 33868b4e14124800035ea99df111b35b4199ae60 (diff) | |
[FIX] account_edi: a failed import of an attachment with account_edi now allows OCR to run automatically.
Before this commit, account_invoice_extract and account_edi where independent in parsing files uploaded or added as attachment in an invoice. Some tricks where used to avoid clash, but they were not perfect and some bugs appeared like the OCR not triggering automatically or an attachment being parsed twice by account_edi when parsing failed. The goal of this commit is to unify the import of files between the two features and ensure that they will not clash.
For more information about potential problems that appeared before :
See https://github.com/odoo/odoo/pull/61169
See https://github.com/odoo/enterprise/pull/15124/
closes odoo/odoo#65510
Related: odoo/enterprise#16138
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons/account/wizard')
| -rw-r--r-- | addons/account/wizard/account_tour_upload_bill.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/wizard/account_tour_upload_bill.py b/addons/account/wizard/account_tour_upload_bill.py index fdfac251cbc..b32ab9892d6 100644 --- a/addons/account/wizard/account_tour_upload_bill.py +++ b/addons/account/wizard/account_tour_upload_bill.py @@ -63,7 +63,7 @@ class AccountTourUploadBill(models.TransientModel): 'res_model': 'mail.compose.message', 'datas': self.sample_bill_preview, }) - bill = purchase_journal.with_context(default_journal_id=purchase_journal.id, default_move_type='in_invoice')._create_invoice_from_single_attachment(attachment) + bill = purchase_journal.with_context(default_journal_id=purchase_journal.id, default_move_type='in_invoice').create_invoice_from_attachment(attachment.ids) if self.selection == 'sample': bill.write({ 'partner_id': self.env.ref('base.main_partner').id, |
