For a first iteration, Russian translations were done using DeepL using
1 large .pot file of all the standard modules to translate (e.g. no
localizations, no test modules, etc). Unfortunately for some reason
doing a msgmerge with the existing ru.po files didn't seem to work, so
old "Translators" metadata at top of files were lost (maybe they will be
re-added during next Transifex sync?)
Part-of: odoo/odoo#152285
- Proxy user is no longer a computed store=True field, but a proper one.
The type cannot be deduced just by some field on the company.
A company may be Italian and also use Peppol, so the two Proxy Users
must be different.
- The Proxy user `get_proxy_identification` method needs a proxy_type
argument, otherwise the method won't know if the current override
is to be applied or not. It cannot be handled by a field of the user
itself because it is also used contextually to the user creation.
- new `_get_default_enable_send_by_post` function on the Send and Print
wizard, so that it can be overridden by the features of the move
- Renamed `_compute_send_mail_extra_fields`
to `_compute_fields_from_moves_state`
Part-of: odoo/odoo#122194
Currently, the migration key is stored through a workaround as a config parameter,
because the behaviour needed to be changed in stable.
Now, several things can be fixed:
- `account_peppol_migration_key` is now a field on `res.company`, not `account_edi_proxy_client.user`
- `account_peppol_attachment_ids` can be removed as the specs changed and it's no longer necessary
- `peppol_proxy_state` can be removed as it's no longer useful after `enable_peppol` was added
- SQL constraints need to be changed to only include active users.
This allows users to deregister/migrate away from Peppol and then re-register later, with their previous edi user being archived
closesodoo/odoo#129595
Related: odoo/upgrade#4980
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Since commit 8590c6a, the edi proxy user is no more neutralized.
Now proxy users related to l10n_it_edi are set to 'demo' mode and other users
are set to 'test' mode.
opw-3439385
closesodoo/odoo#129935
X-original-commit: 4b8759d340e7ad2ae38572f374726087db2437cf
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Thomas Beckers (tbs) <tbs@odoo.com>
This commits adds `account_peppol` module that allows:
- Registering as an account edi user and send an application to the peppol proxy,
where the participant can be approved or rejected after reviewing the documents attached.
- Sending invoices by selecting 'Send via Peppol' option in the send & print wizard.
- Receiving peppol documents.
task-3159912
closesodoo/odoo#119120
Signed-off-by: Laurent Smet <las@odoo.com>
Edi format is going to be removed eventually - `account_edi_proxy_client` should not depend on it and be more flexible in general.
This commit:
- Removes edi_format field from `account_edi_proxy_client.user` model. We still have to add them in `l10n_it_edi` as it still heavily relies on edi format for now.
- Adds a way to have a unique edi user per company, proxy user, edi mode combination.
This is a necessary step before adding peppol, which will also depend on the account_edi_proxy_client
closesodoo/odoo#116059
Related: odoo/upgrade#4458
Signed-off-by: Laurent Smet <las@odoo.com>
Added views and menuitems for account_edi.document
and account_edi_proxy_client.user, so that our technical team
will be autonomous in its investigations.
Task link: https://www.odoo.com/web#model=project.task&id=3204255
Task-3204255
closesodoo/odoo#115751
X-original-commit: 5e771b131e85b42a747936daf698f62fe2b125b5
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
Every imported vendor bill now will have the chance to make its invoice_origin linked to a Purchase Order.
The function is moved from account_journal to account_edi_format to allow the link being done from all webservices, thread attachments and upload.
- Avoid mocking the proxy testing
The test on the check that the same attachment is coming twice from the proxy doesn't actually need to test the proxy. By splitting the function, we avoid mocking the proxy for no added value. Added an ir.rule for companies to only look for their account_edi_proxy_client.users
- PA Index label should be Destination Code
PA Index is a completely wrong description. This is the destination "address" of the partner at which our EDI documents (invoices) should be directed to inside the SdI e-invoicing system, much like an IP address. It's not an index, doesn't have much to share with the Public Administration. The correct literal translation of the name should be "Destination Code"
for Codice Destinatario. We have clients opening tickets because they don't recognize this field on the partner form because of the wrong translation.
- Fixes on taxes import
Lines didn't have their taxes cleared, so invoices actually added the taxes in the XML to the default supplier taxes of the product VAT taxes on import search was conflicting with actual withholding / pension fund taxes, so extra conditions are added in the search if withholding / pension fund fields are not specified
Task link: https://www.odoo.com/web#id=3175353&model=project.task
Task-3175353
closes odoo/odoo#114870
Forward-port-of: #111365
Signed-off-by: Josse Colpaert <jco@odoo.com>
This is mostly a cleaning/refactoring change.
The current API for init hooks (pre, post, uninstall) is to pass
`cr, registry`.
But the first thing which was done by most
post init and uninstall hooks was to create an env using
the cr passed
e.g.
`env = api.Environment(cr, SUPERUSER_ID, {})`
and the `registry` argument was unused in all these hooks,
completely.
By changing the API of hooks to pass `env` instead
of `cr, registry`, we gain in average two lines in every
hooks:
- the line creating the env `env = api.Environment(cr, SUPERUSER_ID, {})`
- the line importing `api` and `SUPERUSER_ID`
Therefore removing ~250 lines of repeated code lines accross odoo/odoo and
odoo/enterprise.
In addition to these lines removed,
it also ease the API of init hooks for Odoo developers,
who are used to that `env` and not so much how to create an `env`
from a cursor.
Part-of: odoo/odoo#108254
Before this commit the neutralize system introduced in v16 was using ORM
methods in order to change appropriate records. Although flexible, this approach
could lead to call some methods with side effects while neutralizing
(eg: overloads of write).
This patch converts the neutralize system to a safer "inert" SQL based approach
by migrating the generic method _neutralize to SQL files exposed in the
data folder.
Task id: 2961687closesodoo/odoo#102792
X-original-commit: e5dbded9bb363351feff7ca8a56c7f8a6860f492
Related: odoo/enterprise#32580
Signed-off-by: Fabien Meghazi <fme@odoo.com>
Remove most values uselessly specified because giving the same value as
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)
* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default
This will reduce noise/inconsistencies between manifests specifications,
simplify analysis of manifests content, ...
closesodoo/odoo#90209
Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
The proxy test server has been updated, and there is a new url, this
commit updates the default server constant in the code to match the new
url.
closesodoo/odoo#87271
X-original-commit: d1485227096a6bf1d473c6d3c26ca54dbffbe3e0
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
The issue is that the config param is data, which means that when the
module is updated, the config parameter will be updated (i.e. reset to
the 'demo' state), which will cause havoc on client databases. Even if
we set the record to 'noupdate=1', the existing clients will have the
record updated.
The solution is to remove the config param from the data entirely, thus
preventing it from being updated when updating the module, and instead
have a 'post_init_hook' that sets the parameter to 'demo' (this will
only happen when the module is installed, and never again).
closesodoo/odoo#86607
X-original-commit: 1d3cd7ee32caede10cd4ffd496ffd59a4103b04f
Signed-off-by: Josse Colpaert <jco@odoo.com>
To properly register account_edi_proxy_client.user when saving the res
config settings page, the radio buttons needed to be modified, and the
'register' button was adapted to be a checkbox instead.
Registering multiple demo proxy clients lead to an error, as it is
asserted that id_client should be unique, and the demo client has
'id_client': 'demo'.
To fix this, the id of a demo client is 'demo' + the company id.
Searching for demo clients is adapted to search on the first four
characters.
closesodoo/odoo#85794
X-original-commit: 54e54466f0858d4b19fa8f61ff2b927e00f8f5a8
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
As the proxy client user can only be accessed by base.group_system,
we need a sudo() to make it possible for a regular user to send
invoices.
closesodoo/odoo#85566
X-original-commit: 79a076b832a785b78ed6d73d539d3eae6eb2fd02
Signed-off-by: William André (wan) <wan@odoo.com>
- Sometimes the refresh_token is not saved in the db because the code
after it fails (timeout). We also want to avoid 2 processes
trying to renew the token at the same time (=> avoid desynchronization
of the refresh_token)
So, we added a locking mechanism and do a commit after we refresh the
token.
- If we have very big invoices to receive, they do not get imported into
the database. At the moment we risk timeouts.
Our solution is to do a lot of intermediary commits and we link it
to a temporary account_move before doing the import logic and maybe
putting it into the definitive one.
closesodoo/odoo#85372
X-original-commit: ce47d09c05e4bcc91ee4de68db3a7a471bcb4df8
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
- A new flag is added to the Setting (l10n_it_edi_sdicoop_demo_mode)
that is computed from the ir.config_parameter
'account_edi_proxy_client.demo'.
If the flag is 'demo', Odoo will not send invoices through the EDI,
if the flag is 'test', Odoo will send invoices to an IAP test server
instance that operates with a test SDICoop service
if the flag is 'prod', Odoo will send invoices to production IAP,
that routes them to the official SDICoop service.
- Some minor UI rework for the EDI parameters on res.company
The EDI settings in the res_company form, under the
'Electronic Invoicing' tab, must stay on the left
closesodoo/odoo#84925
X-original-commit: c5d049c55d21f9885e79182df2bd5f433c5bb782
Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit adapts the l10n_it_edi_sdicoop and account_edi_proxy_client
modules to make use of the existing config param
'account_edi_proxy_client.demo' in order to target the correct odoo iap
server for italian edi requests.
When the config param is set to:
'prod' or False (when the config param doesn't exist): Target the
production odoo iap server (by default), which submits and collects edi from the
production channel. Though if the config parameter
'account_edi_proxy_client.edi_server_url' exists, we use the value
provided there instead.
'test': Target the test odoo iap server, which submits and collects edi
from the test channel
'demo' or anything else not above: don't send anything, and simulate the
flow of italian edi submissions in odoo
task-id 2764978
X-original-commit: 32683b70a34a900a112d19bf780446a973753ae5
Part-of: odoo/odoo#84826
As an overridable _neutralize model method was added in a previous
commit, the method is now implemented for various models.
closesodoo/odoo#67825
Related: odoo/enterprise#19042
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
There is a test_mode to allow experimentation on the IAP server.
To be able to switch between the two, we need to make the
SERVER_URL configurable.
closesodoo/odoo#77977
X-original-commit: 11be1b25c60ae27a5e8078802883a1db867a6452
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Paolo Gatti <lordkrandel@users.noreply.github.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