Commit Graph
79 Commits
Author SHA1 Message Date
Josse Colpaert 76efa26896 [FIX] account_edi: also lock account_move for sending
Fix in cc67b5ac95 was done in v14
originally and would lock both the edi document and the
account move instead of just the edi document
(and the move while cancelling)

However in the fw-port in 5319b71b66,
some kind of mix happened.

We have some tickets in v15 however where the
invoice is sent to the government, but it was not changed in Odoo because
of the concurrent access on the account_move, so we need to lock the
account_move as well.

opw-2714559, opw-2663502

closes odoo/odoo#82254

X-original-commit: 8d896b19007a788d88f2ffb45385f0d10cb476b5
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-01-05 11:36:06 +00:00
wan 1656f1a093 [FIX] account_edi: search partner based on VAT with spaces
This solution is not perfect. In order to be, we would need to have a
sanitized function that is used to store the number in the database, and
to use the same function to search in it. This will most likely be done
in master with a refactoring of `base_vat`, on which `account` will
depend one way or another.

In the meantime, we need to support cases that were working before these
fixes:
https://github.com/odoo/odoo/commit/bfb2436b9d99bf9eea29ee44000e18197efa88b6
https://github.com/odoo/odoo/commit/e24c5ba4efef466919735ec4304cfd46be5f0d3f

Since these, it was indeed impossible to detect a partner based on his
VAT for Swiss partners if `base_vat` was installed, which is the
default.

closes odoo/odoo#81263

X-original-commit: 04aa5cd79c6aca1615ba022c351054a390e6c0b5
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-12-14 13:28:56 +00:00
Laurent Smet ed75307baf [FIX] account_edi: Add missing 'extra_domain' + Fix tests l10n_be_edi
- allow to match a partner having 'BE0477472701' as vat but '477472701' inside the xml.
- code cleanup as suggested in the original PR

Introduced by https://github.com/odoo/odoo/pull/80266

closes odoo/odoo#81237

X-original-commit: 598bfedb540aa81676b957340255aafef85d2823
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-10 15:28:57 +00:00
Martin Trigaux d99cfd9416 [I18N] *: export saas-15.1 source terms
closes odoo/odoo#80964

X-original-commit: 0663892a34896980008eb0de69aeb58019a67e89
Related: odoo/enterprise#22759
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-07 13:48:53 +00:00
Nicolas (vin) 62954aaaf5 [IMP] [base, account_facturx]: Add PDF/A(-3B) support
Improve the factur-x export in two ways: make the exported PDF
PDF/A-3B compliant, and add the factur-x XMP metadata inside the file.

The added .ICC profile comes from https://www.color.org/srgbprofiles.xalter
License terms can be found here: https://www.color.org/profiles2.xalter#license

Task id # 2668919

closes odoo/odoo#80741

X-original-commit: 3a9a685fc360fee7fe10ed7fdb768414697673b2
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-04 21:45:04 +00:00
Arturo Flores eb78b67e93 [IMP] account_edi: improve how we handle attachments for the email
When assembling the email we are leaving the assignment of the attachments
to another method that we can inherit and then modify instead of doing it
in the same method to attach them.
The idea is that in any localization we need only to modify that method
in order to add new attachments to the mail template.

closes odoo/odoo#80490

X-original-commit: 6f2e7dc3e8c468bcdb0862468eb08b65ce40c983
Related: odoo/enterprise#22568
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-30 15:22:05 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
Habib (ayh) 90c681a8f9 [IMP] account_edi,account_edi_extended,l10n_es_edi_sii,l10n_it_edi_sdicoop: improve the ability to debug EDI xml
When using EDI, documents often fail to be submitted to the relevant API. This provides the ability to generate and download the XML

Task-2669041

closes odoo/odoo#80088

X-original-commit: 6eba7935c4d4f0fef5e1e7ad9b1d7726aa3db109
Related: odoo/enterprise#22392
Signed-off-by: Laurent Smet <las@openerp.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
2021-11-19 12:51:05 +00:00
Laurent Smet 85f2ae03d3 [IMP] account(_edi): Detect when an invoice is ready to be sent
In some flow like subscription, invoices are sent by mail automatically to the customer.
Sometimes, the invoice must be approved by the government before sending the mail like the Mexican EDI.
This commit aims to add a custom method to detect when an invoice is ready to be sent to the customer.

PR (community): https://github.com/odoo/odoo/pull/78714
PR (enterprise): https://github.com/odoo/enterprise/pull/21809

closes odoo/odoo#79504

X-original-commit: 3a29371eb70309f46e3b8938434287fefc23b351
Related: odoo/enterprise#22171
Signed-off-by: William André (wan) <wan@odoo.com>
2021-11-09 14:45:57 +00:00
Andrea Grazioso (agr-odoo) 59c2d7fe53 [FIX] account_edi: tax (included) amount shows as discount in CFDI
1. Configure MX company, make sure testing certificate and vat are loaded into the company
2. Sign an invoice with 16% included in price

No errors will be shown but opening the resulting CFDI xml will show a
discount "Descuento" equal to the tax amount, which is incorrect

opw-2665082

closes odoo/odoo#79501

X-original-commit: 3f58aefe607e562044617e2c9dbecb1afd2de586
Related: odoo/enterprise#22170
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-08 13:24:25 +00:00
Josse Colpaert 5d4e0210a0 [FW][ADD] l10n_es_edi_sii: send invoices to sii for G417 Llevanza de los libros
This module sends the taxes information (mostly VAT) of the
vendor bills and customer invoices to the SII.  It is called
Procedimiento G417 - IVA. Llevanza de libros registro.  It is
required for every company with a turnover of +6M€ and others can
already make use of it.  The invoices are automatically
sent after validation.

How the information is sent to the SII depends on the
configuration that is put in the taxes.  The taxes
that were in the chart template (l10n_es) are automatically
configured to have the right type.  It is possible however
that extra taxes need to be created for certain exempt/no sujeta reasons.

You need to configure your certificate and the tax agency.

closes odoo/odoo#76615

Task: 2492978
Forward-port-of: https://github.com/odoo/odoo/pull/70302
X-original-commit: ff4cb972b6a8b61caeac13d8eb5c6a4d43a62ccb
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-20 16:39:58 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Laurent Smet 52ba7626ec [FIX] account_edi: Prevent opening the EDI documents in any case
Also, remove the duplicated 'edi_document_ids' field inside the view.
'edi_document_ids' is now in debug mode for payments.

closes odoo/odoo#76123

X-original-commit: ad346eec9fd06e430b9b5859578b00e0b28cc443
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-09-10 08:49:01 +00:00
Laurent Smet 433656415a [IMP] account: Generic way to compute the tax details for each journal item/invoice line
In some reports, we need to detail the taxes for each journal items.
This is the case of all EDIs, the SAFT-report, l10n_in etc.
This task adds an SQL view mapping each tax lines with their corresponding base lines and computing the tax_amount and base_amount.

closes odoo/odoo#70866

Task: 2352524
Related: odoo/enterprise#18344
Related: odoo/upgrade#2686
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-08-04 13:45:52 +00:00
Benjamin Frantzen (bfr) 6eb7a45df1 [IMP] account_edi: add edi_state to account.move tree view
Optional=hidden
Also added a group_by filter

Task ID: 2591510

closes odoo/odoo#73383

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-13 14:58:40 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
william-andre c1d24ce9cc [FIX] account_edi: only try to lock if there is something to lock
This check was done before cc67b5ac95 but
removed without apparent reason.
2021-07-19 10:14:24 +00:00
Benjamin Frantzen (bfr) 5319b71b66 [IMP] account_edi: decouple attachment from the state of the edi_document.
Before this commit, for an EDI to be successfully posted, returning an attachment from 'post_invoice_edi' was required. In some cases this caused problem:
- When an EDI is posted in two steps, sometimes the attachment is generated in the first step and nothing is returned until the second step. This forced to do some hack where the reference to the attachment in a seperate field to be able to return it after the second step.
- When an EDI doesn't have a file to return (maybe we just send data over an API and get a response without any file involved).
Now, the attachment are removed from account_edi flows. When returning from 'post_invoice_edi', it is still possible to return an attachment whose reference will be kept in the edi_document, but will not change the state of the document to 'sent'.
To make the state change to 'sent', 'post_invoice_edi' must return {'success': True}.
Nothing has changed in the 'cancel' flow, meaning that the buttons related to canceling or reseting an invoice to draft are now based on the state and not on the existence of an attachment on the document. Also, when an invoice is successfully cancelled, the reference to the attachment is STILL removed from the document, since the document does not represent an electronic invoice anymore.

closes odoo/odoo#70040

Related: odoo/upgrade#1946
Related: odoo/enterprise#13220
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-16 09:08:55 +00:00
Benjamin Frantzen (bfr) e615d4ad8b [IMP] account_edi: added hook when retrying EDI & reword some text
In some cases, non-generic operation needs to be done when retrying to process and edi.document.

For example : for web-services with two steps, if there is an error we need to restart the two steps (and therefore reset the internal state of the edi to the first step, typically by deleting the transaction_id). In case of a warning, we want to retry the second step. This can only be done in the non-generic part of the code, so a hook is added in `account.move`.
2021-07-16 09:05:43 +00:00
snd cc67b5ac95 [FIX] account_edi: more global account.move lock
In some specific cases, a serialization error can happen on the account
move if it's not a move to cancel. If it happens, the full process
starts again for that move, which includes the requests sent to the
PAC in MX accounting.
It will send 2 CFDI files for the same invoices and the PAC will
interpret that as 2 different invoices, which is a problem.

This fix ensure that the concerned account moves are always locked
to avoid this kind of issue
opw-2489399
opw-2529134

closes odoo/odoo#73789

X-original-commit: bcc4934f80bea4ce70b9edfb22fd40030c5f0063
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-15 15:58:28 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Benjamin Frantzen (bfr) 7ee8520bfb [IMP] l10n_it_edi: added support to import p7m files
Before this commit, only files coming through ir_server_mail where parsed. The goal of this commit is to allow upload of p7m files.

closes odoo/odoo#73337

X-original-commit: 13ff9b488d28da5dceec22e1c26f448796ca30c0
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-07-07 09:49:24 +00:00
Benjamin Frantzen (bfr) d83709c1b0 [IMP] account_edi: added hooks to import any kind of files as an invoice
X-original-commit: 27688e2aab46a9dd1ed9ad82d1d888eed1df3b83
2021-07-07 00:32:24 +00:00
Laurent Smet b98f6bd12a [REF] account_edi*: Improve the tax details computation for EDI
Add a generic method to compute taxes and group results together.

closes odoo/odoo#71743

Related: odoo/enterprise#18758
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-06-30 07:37:19 +00:00
Benjamin Frantzen (bfr) 0897b49114 [IMP] account_edi: html_escape error
In account_edi, errors are shown as html, and might come from an external service if they are returned by a web-service.

X-original-commit: 261c037a602edb907a4c2018cf8b0c8cab0f2f63
2021-06-09 18:22:33 +00:00
Benjamin Frantzen (bfr) 22e04c6d56 [REF] account_edi: remove test_mode from _post_invoice_edi and _cancel_invoice_edi
Before this commit, business logic was mixed with tests. This commit aims to replace the test_mode with mocks for all account_edi tests.

closes odoo/odoo#71650

Related: odoo/enterprise#18709
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-06-03 09:18:24 +00:00
Martin Trigaux 41d8b8cf68 [I18N] *: export saas-14.3 source terms
closes odoo/odoo#70673

X-original-commit: bcb9ff784e44462384b0a43a0a23eed7a1111bc5
Related: odoo/enterprise#18269
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-11 12:28:28 +00:00
Benjamin Frantzen (bfr) 5c3707832c [FIX] account_edi_facturx: fix filename in pdf embedding
When embedding to pdf, the name of the attached file should be 'factur-x.xml' (official specifications, section 6.2)

closes odoo/odoo#70442

X-original-commit: 04f4633d15f0a0824bd07f56a0f99491584f1a12
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-05-06 07:03:48 +00:00
Benjamin Frantzen (bfr) b27614b136 [FIX] account_edi_ubl: extracting the pdf from the imported xml doesn't raise an exception any more when creating a new invoice
Before this commit, when an attachment was present in the xml (pdf) and the import was to create a new invoice, it crashed when trying to post the pdf on the not-yet existant invoice.

This commit also fixes:
- In the tests, `create_invoice_from_file` didn't handle the subfolder parameter correctly
- `create_invoice_from_file` now returns the created invoice

closes odoo/odoo#69722

X-original-commit: e81457501f4815a4d9add7a56a9dfe66a7656269
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-04-22 16:57:12 +00:00
jbw b7b9b18ac1 [IMP] account: Payments Form View Improvement
The Payment form view is simplified for a much less cluttered screen.
A paired internal payment is now created when an internal transfer is posted.

Task: 2403336
2021-04-02 06:11:11 +00:00
Laurent Smet 6db346767e [ADD] account_edi_ubl_bis3,l10n_nl_edi : added bis3 and nlcius formats
closes odoo/odoo#68514

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-04-01 14:58:20 +00:00
Laurent Smet b58810a77b [IMP] account_edi(_*): Standalone UBL format + edi.format inheritance
task: 2361217
2021-04-01 14:58:20 +00:00
Laurent Smet c9f9f859ca [IMP] account_edi: Replace high velocity CRON by CRON triggers
So, instead of waiting for the cron every hour, we create
a cron trigger, which is created/activated every time
we post/cancel an invoice.  When the CRON worker is available,
it can take the job immediately.

To be sure that we don't miss any crons or that events
might be needed that are not triggered, we still launch the
cron every day.

A test was added to check that the crons are correctly
triggered.

closes odoo/odoo#67088

Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-04-01 13:55:48 +00:00
oco-odoo 17610e8ca9 [IMP] account, account_edi, l10n_*, purchase, sale: Generalize the use of account_fiscal_country_id
Before, account_fiscal_country_id was only use for tax operations; and country_id was used for all the other accounting stuff. Now, with the new ability to use foreign tax reports (with foreign VAT fiscal positions), we can generalize the fiscal country, sot that it is the one that needs to be used for the whole accounting. Since foreign tax reports were not supported before, account_fiscal_country_id is already set on existing database as the country for the "main" accounting, so the impact of this change is small.

closes odoo/odoo#68349

Related: odoo/upgrade#2322
Related: odoo/enterprise#17299
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-04-01 12:09:20 +00:00
Laurent Smet 9b993f4af7 [IMP] account_edi[_facturx]: Add generic values to export invoice EDI 2021-03-29 17:57:57 +00:00
Josse Colpaert dc40a5a01c [FIX] account_edi: also send electronic document for the payments
When we want to send the invoice to the client, a hack was made in account_edi
to make sure that we put the XML of the electronic invoice formats as well, in
the case of web services such that the client has the XML we sent to the government.

For MX however, we also send the payment to the government.  However when we wanted
to send the confirmation about the different changes, we still needed to add the XML
manually before this fix.  Now it should be added manually even when manually composing
the mail to the customer with the payment receipt confirmation.  (but we hope it dies)

closes odoo/odoo#67315

X-original-commit: 327852a6399a19191bd78c820971cc4108dc7821
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-05 09:20:58 +00:00
Benjamin Frantzen (bfr) 77205beb92 [FIX] account_edi : fix visibility of 'Retry' button
Before this commit, the button 'Retry' would appear if the blocking_level of an account.move (aggregated value of all the related edi.document) was lower than 'error' even though the button 'Send now' also appears. The button 'retry' should only show if the blocking_level is 'error'.

Was fixed in https://github.com/odoo/odoo/pull/65714
Reintroduced in https://github.com/odoo/odoo/pull/65745

closes odoo/odoo#67312

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-05 08:41:48 +00:00
Benjamin Frantzen (bfr) 082a370514 [IMP] account_edi: visual improvements on account.move and account.invoice.send
- don't show Electronic Invoicing field on account.move view if no EDI require web-service
Backport of https://github.com/odoo/odoo/pull/64493 (TASK ID: 2439258)

- don't show account_edi_format field on account_invoice_send

closes odoo/odoo#67282

X-original-commit: 049ccc0257b36bb6c66ffe8a4498857a77498791
Related: odoo/upgrade#2235
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-03-05 08:27:42 +00:00
Martin Trigaux 9741ef5ee6 [I18N] *: export saas-14.2 source terms
For odoo-master Transifex project, no demo data

closes odoo/odoo#66500

X-original-commit: 813931ac850e5ba4181259a5957ec72226fb670c
Related: odoo/enterprise#16510
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-19 08:02:58 +00:00
Benjamin Frantzen (bfr) e3bd3fec38 [IMP] account_edi: merge account_edi_extended
TASK ID: 2457873

closes odoo/odoo#65745

Related: odoo/enterprise#16226
Related: odoo/upgrade#2144
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-02-11 08:08:18 +00:00
Benjamin Frantzen (bfr) 7785fcb819 [FIX] account_edi: edi.document are re-send if they are in error
Before the introduction of account_edi_extended and blocking_level, if an edi.document was in error, it was retried each the time the edi.documents were processed. With account_edi_extended a bug was introduced and only the document not in error were processed. This commit aims to restore the previous behavior.

Also fixes tests of account_edi.

See https://github.com/odoo/odoo/commit/a9a46cf09b0c841c7fda95b5ed03033fc6936ca2

X-original-commit: 385fa29322f6dffc7d7d0de96a1cfbddb0cab7f0
2021-02-08 12:20:37 +00:00
Benjamin Frantzen (bfr) fbc77a6ecd [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#65660

X-original-commit: 8435d0e8990509ee67425977f970ab27bea8133a
Related: odoo/enterprise#16172
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-02-05 17:56:12 +00:00
Benjamin Frantzen (bfr) ce674f1b21 [IMP] account_edi: added error_level + better management of Lock on account.move
- Some errors will never get fixed until user intervention, it doesn't make sense to run the CRON when there is such error.
+ some small improvements and esthetic changes
- When we are in a CRON, we need to commit the changes between each call to web-service to avoid loss of data.
- Small refactor of edi.document prepare_jobs and process_jobs
- Added an arbitrary key to create the batches.
2021-02-01 14:41:58 +00:00
Benjamin Frantzen (bfr) 684587fbe1 [FIX] account_edi: better locking of documents and other models when processing EDI
- On account_edi_document, lock the documents successively instead of all at once.
- Lock account_move that should be cancelled. Before, cancelling the invoice after cancelling it on the web-service could fail.
- Lock ir_attachment that might be unlinked. Before, attachments that weren't attached to any model could become unreachable but still present in the database when an invoice was cancelled or a new attachment was produced.

closes odoo/odoo#64946

X-original-commit: 8d0c25f359f92533eb25f2990d6e2aceef33b77a
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-01-22 15:02:57 +00:00
Benjamin Frantzen (bfr) 859da10dc2 [IMP] account_edi: don't show Electronic Invoicing field on account.move view if no EDI require web-service
TASK ID: 2439258

closes odoo/odoo#64493

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-01-21 15:29:23 +00:00
wan 309c742299 [IMP] account_edi: dot not flush for perfs
This reduces the number of cache invalidation and recompute.

Because the full environment was not flushed anymore everytime, the test
:TestSaleProject.test_project_overview_by_project was failing.

closes odoo/odoo#49276

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-01-22 10:14:48 +00:00
nie 23233a7051 [FIX] tools: try decrypting PDF with empty password
Steps:
- Install accounting
- On the dashboard, try to upload an "encrypted" PDF like this one https://launchpadlibrarian.net/24827090/DS-0157.pdf

Bug:
Traceback:
PyPDF2.utils.PdfReadError: file has not been decrypted

Explanation:
In 13.0, these errors were caught in a catch all `except` as shown here: https://github.com/odoo/odoo/blob/4e089041252c25cc197a30f9e285d82f7162d809/addons/account_facturx/models/account_move.py#L303-L328

From this SO comment: https://stackoverflow.com/questions/52047944/pdfbox-extracting-blanks-from-pdf-encrypted-with-no-password#comment91054285_52047944

> A PDF can be encrypted with two passwords: a user password and an owner password. When a PDF is encrypted with a user password, you can't open the document in a PDF viewer without entering that password. When a PDF is encrypted with an owner password only, everyone can open a PDF without that password, but some restrictions may be in place.

From time to time, we get a PDF encrypted with an owner password. The
content is still readable, but PyPDF2 fails because it thinks the PDF is
encrypted. With this fix, we try to unwrap the PDF by providing an empty
user password. This way, PyPDF2 thinks the content is now decrypted.

However, PyPDF2 only supports decrypting versions 1 and 2 of the
encryption implementation. If the version is different, we skip reading
the attachments and carry on to allow the user to upload the document.

opw:2375993

closes odoo/odoo#64320

X-original-commit: 851fe64f7789bb398383c22e3ebbaebb051791f6
Signed-off-by: backspac <backspac@users.noreply.github.com>
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-01-11 10:56:43 +00:00
Ivan Yelizariev f412ff0ceb [FIX] account_edi: hide alert when there are no web services
this is more safe way than previously applied in
https://github.com/odoo/odoo/pull/62939

because it doesn't require ``-u account_edi`` in cases when it worked
correctly, i.e. when _compute_edi_web_services_to_process is called, but
computes empty string value.

Additionally, it fixes same problem in account.payment model.

---

opw-2414500

closes odoo/odoo#63543

X-original-commit: d393467886be1bd356a135e3fdc1ebb304c6614c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-12-17 13:58:28 +00:00
Benjamin Frantzen (bfr) e1c49246a2 [FIX] account_edi: fix 'send now' visibility in account.move form view
- Before the fix, the banner with the button would show when the move is posted or in creation mode even though no async edi is associated to this move.

closes odoo/odoo#62974

X-original-commit: e18c3f023d10944b2cea9cd23703529b41ba48d3
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2020-12-07 16:04:02 +00:00
Laurent Smet eb768edef7 [FIX] account_edi: Don't display edi_document_ids on view if nothing to show
closes odoo/odoo#62843

X-original-commit: f5de98a2ad67f6e507f81cff34ddf4f0dcae816a
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-12-03 17:06:32 +00:00