The number is set as zeros, but we should still provide
the IdPaese tag.
opw-2703669
closesodoo/odoo#82398
X-original-commit: 3e4361ff621e5458e6a2ad09610274bf33290106
Signed-off-by: William André (wan) <wan@odoo.com>
When encoding a string or bytes with base64,
the resulting byte string must be decoded
to get the string back.
* `addons/account_edi_proxy_client/models/account_edi_proxy_user.py`
AccountEdiProxyUser._register_proxy_user()
* `addons/l10n_it_edi/models/account_invoice.py`
AccountMove._prepare_fatturapa_export_values()
* `addons/l10n_it_edi_sdicoop/models/account_edi_format.py`
AccountEdiFormat._l10n_it_post_invoices_step_1()
X-original-commit: 3a705d93543e910b6af4b3b4aa53c523f367782a
Part-of: odoo/odoo#77977
In order to limit encoding decoding, the _render method returns a
unicode string in the markup safe object instead of a MarkupSafeBytes
closesodoo/odoo#68299
Related: odoo/upgrade#2454
Related: odoo/enterprise#17270
Signed-off-by: Antony Lesuisse (al) <al@openerp.com>
Even in the interface, when we empty a string, the value
in the database is '' and not NULL. So, we should let the user
put the field to '' again. (as it is not required)
This will require un update, but otherwise, it just relaxes
the constraint.
closesodoo/odoo#74572
X-original-commit: bc64805e27c9f31f446680aa2398affb945ffd83
Signed-off-by: William André (wan) <wan@odoo.com>
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.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Some field strings are duplicated and raising a warning in the CI.
Solution is to remove duplicated fields and put them in a common module,
or to change the string in the field declaration and put the right one
in the view.
If the buyer is Italian, it must have a zip code of length 5.
If the buyer is not Italian, the zip code is optional
closesodoo/odoo#73883
X-original-commit: 86aa7507b0d86bd13dba303c75821048d420f647
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
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.
closesodoo/odoo#70040
Related: odoo/upgrade#1946
Related: odoo/enterprise#13220
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Codice Fiscale can be 16 length (letters + digits) for physical people.
Codice Fiscale can be 11 digits prefixed or not with 'IT' for companies.
An error is raised if the codice fiscale is not saved in the correct format. When registering to l10n_it_edi_proxy, we try to normalize the Codice Fiscale if possible.
Also, when entering the vat in the partner, the Codice Fiscale is automatically set normalized.
closesodoo/odoo#73774
X-original-commit: 3741e141e5a468b8ce0413f4f7d7fc05751b0c1b
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
Before this commit, only files coming through ir_server_mail where parsed. The goal of this commit is to allow upload of p7m files.
closesodoo/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>
When importing vendor credit note from an italian e-invoice xml file with a "DettaglioPagamento" section,
the data import will fail and you will have the "Unsupported image format" message on top of the invoice.
The use of '_compose_info_message' function is not possible on a 'account.edi.format' object and was
changed to use the 'invoice' parameter.
opw-2500569
closesodoo/odoo#72018
X-original-commit: 8e886704a4efb9ca2f8d2e2b021f66d668af40d8
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
- Allows to send and receives invoices from the fatturaPA network via the webservice (SdiCoop).
- PEC mail is disabled when SdiCoop is disabled.
- Added account_edi_proxy_client, a registered user on the proxy (see l10n_it_edi_proxy on iap-apps), that features encryption. Generates a asymmetric keys, and keep the private_key to be able to decrypt file sent by the proxy (which it encrypted with the public key).
- Added a generic way to sign the requests made to the proxy.
TASK ID 2358882
closesodoo/odoo#71928
X-original-commit: 4c8afc413a8982b2e77712eab7cf7ddac9f3851f
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fields
1) account.move -> narration
2) account.payment.term -> note
3) account.fiscal.position -> note
4) res.company -> invoice_terms
5) res.config.settings -> invoice_terms
Task Id: 2499504
X-original-commit: 0f3c7f153e8bd20f83b7d1df031634996d36935b
- The context used to create the Form used 'with_context' instead of 'with_company'.
- An additional message has been posted to the chatter with the original E-invoice XML from the email.
- Some code clarification were due where the e-invoice company is determined.
opw-2460485
closesodoo/odoo#71626
X-original-commit: db25a9d02c2fd836e05632ef1e27b73cfdd863e3
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Paolo Gatti <lordkrandel@users.noreply.github.com>
When one or more vendor bills in Italian e-invoice format were sent to the registered PEC mailbox, if they are in the PKCS#7 format ('.xml.p7m'), nothing happened.
The e-invoice content should be automatically decoded and the invoice should be created as soon as the xml file is fetched from the PEC mailbox.
A new remove_signature function has been added in a tools/remove_signature.py file to handle this case.
The OpenSSL and pyOpenSSL libraries must be installed.
They are not in requirements.txt but they're probably available.
New tests has been provided for the signed email reading method.
opw-2460485
closesodoo/odoo#71164
X-original-commit: ed723be917637320fc4d2787bdf505e4a7a8216d
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Paolo Gatti <lordkrandel@users.noreply.github.com>
When one or more vendor bills in Italian e-invoice format were sent to the registered PEC mailbox, nothing happened.
The e-invoice related vendor bill should be automatically created when the xml file is fetched from the PEC mailbox instead.
- There was a traceback when account_move.l10n_it_einvoice_name was searched because it's a non-stored computed field.
- Also, the field name account_move.source_email was used, but it was renamed to invoice_source_email.
- The xml parsing etree.fromstring() was incorrectly used with string arguments instead of bytes.
- The context was mistakenly initialized twice on invoice creation.
Tests have been provided for the email reading methods.
opw-2460485
closesodoo/odoo#69347
X-original-commit: da64c1eec4b66a28ec4327f30d15352c2f109b29
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Paolo Gatti <lordkrandel@users.noreply.github.com>
Have 2 companies, one in FR (with l10n_fr), one in IT (with l10n_it_edi)
From the French company create an invoice for a french customer.
Confirm.
The message ' E-Invoice check failed. You can modify the
invoice, and resend it.' related to italian e-invoicing will appear
opw-2481035
closesodoo/odoo#69050
X-original-commit: d5075308131f82020702c6650a1869ffd93fb85e
Signed-off-by: Josse Colpaert <jco@openerp.com>
Steps to reproduce the bug:
- Install l10n_it_edi
- Let's consider an italian company C with l10n_it xhart of accounts
- Create a customer invoice I in C and add a line with a price and a tax
- Add a note line
- Confirm I
Bug:
This UserError was raised: You must select one and only one tax by line.
opw:2484338
closesodoo/odoo#68609
X-original-commit: 49cf25fcc80ec2cb8ba3b3473c7c8d31533e2037
Signed-off-by: Josse Colpaert <jco@openerp.com>
Purpose of the task is to update all l10n modules icon with new icon that i have
found in task attachment.
So in this commit, Updated all l10n modules icon with new icon.
closesodoo/odoo#65329
Taskid: 2442631
Related: odoo/enterprise#16054
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before it was only done on MyCompany, but interferes easily
with other demo data. Better for the Italian localization
to try the demo immediately in IT Company.
We also added an Italian demo partner, so it is clear
which one can work immediately.
closesodoo/odoo#67615
X-original-commit: 91ff96a79121c1b7018f8a1f7fa9850170852c41
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
We need this refactor for the ddt module to be able to pass
the necessary information easily for the link between the invoice
lines and the ddts.
X-original-commit: a4fb5c93f094dc1cd4de75664b7e232bc505e05c
Have an invoice with single line and 0% tax on it
As the tax has 0 amount, no related moves are created,
the e-invoice export will fail the formal compliance check as it is
missing a section
opw-2461496
closesodoo/odoo#66960
X-original-commit: 71cc7212b1c1abad5d37e29f3a1f33f6e6cd2a81
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
For each move post the system send a PEC.
This should not occur, as only outgoing invoice should be
registered in the EDI system as e-invoice
opw-2461496
closesodoo/odoo#67406
X-original-commit: 2bbe214e816902d7e0c85ca38fedbeece9c47e7d
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
WHY: PEC server rejects default addresses, so you cannot test connection
---
opw-2371431
closesodoo/odoo#65516
X-original-commit: 876d3b3b8cf9f91a3609871f69b3ce1186d71ac6
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
This is mandatory for PA customers, and required by several enterprise customers as well.
Related Ticket: 2425845
closesodoo/odoo#64443
X-original-commit: bb898e663019942a6fd99ce96ce5742a8ff7ea56
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
- Create a partner outside Europe
- Set a VAT number
- Create an invoice for the partner
- Post the invoice
The `IdPaese` and `IdCodice` is obtained from the VAT number, but it is
not correct for partners outside Europe: the VAT number should always be
`OO99999999999`.
A workaround is to set the VAT number of the partner to
`XXOO99999999999`, where `XX` is the country code. However, in case of
multi-company with shared partners, another company might need the
proper VAT number.
In case of a customer outside EU, we:
- get the `IdPaese` from the country of the partner
- set the `IdCodice` to `OO99999999999`
We also add the `IdPaese` to customers without VAT.
opw-2355842
closesodoo/odoo#60416
X-original-commit: 35267c59c32f747351e8741cfe6011749914e809
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
For foreign customers (out of Italy) who do not have a VAT number,
"0000000" should be used as VAT code.
opw-2325991
closesodoo/odoo#58204
X-original-commit: c5589bf8880e109990d902bb905c7de967910524
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Added edi.documents representing an electronic document for a move and an edi.format.
A format can be asynchronous if it needs to call a web-service to generate the document, it will then be generated by the CRON (otherwise it's generated in post).
The formats can support payments if needed (can be generated immediately or by the CRON).
Added support for errors and related views.
Setting defaults format on a journal can be done automatically (based on a hook).
Added tests : xml comparaison with diff and helpers to test a EDI import/export
--task: 2247368
Task 2309613
We have a new hierarchy:
* Accounting
* [Generic, not changed]
* Localization
* Account Chart
* Check
* EDI
* Point of Sale
* Purchase
* Reporting
* Sale
This helps in displaying only the chart of accounts when clicking on
"Install more Packages" from the accounting settings in the Fiscal
Localization section.
We can also refine the search in the _auto_install_l10n post init hook
of account.
closesodoo/odoo#55384
Related: odoo/enterprise#12179
Related: odoo/upgrade#1568
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Add an easy way to not post the entries in the future when calling
post() on it, but rather set it to be auto-posted at accounting date.
This is useful when we are creating a lot of entries in batch and some
might be in the future, some in the past, and we don't want to separate
that in two batch every time. (asset, accrual, transfer,... )
Avoid concatenation of translated strings & raw values and/or other
translated values, and use the new _ API (by providing the formatting
values to ensure the fallback on the english terms in case of wrong
translation).
By including the expected values inside the string to translate, we
ensure that the formatted values are included at the right place in the
resulting translated text.
This also provides more information on the string to translate to
the translators, s.t. the chosen terms for the translations can be more
adapted to the translation context.
closesodoo/odoo#54635
Related: odoo/enterprise#11925
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
When the server execute the job 'Mail: Fetchmail Service'
if it's processed an attachment having a Notes field with None values
the following traceback will occur
AttributeError: 'NoneType' object has no attribute 'split'
//IdentificativoSdI','//DataOraRicezione','//Descrizione','//MessageId','//Note'.
seems to be not mandatory
opw-2277722
closesodoo/odoo#54636
X-original-commit: f96be5eb77a998037bdf0b88f96160b856dfc67a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>