Commit Graph
4 Commits
Author SHA1 Message Date
Laurent Desausoi 7593c073d2 [IMP] core: use inert SQL based neutralization
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: 2961687

closes odoo/odoo#102792

X-original-commit: e5dbded9bb363351feff7ca8a56c7f8a6860f492
Related: odoo/enterprise#32580
Signed-off-by: Fabien Meghazi <fme@odoo.com>
2022-10-09 22:04:00 +02:00
dbkosky b19021b047 [FIX] account_edi_proxy_client: don't update the demo state
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).

closes odoo/odoo#86607

X-original-commit: 1d3cd7ee32caede10cd4ffd496ffd59a4103b04f
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-03-18 00:22:51 +01:00
Paolo (pgi) d2d50ba63b [ADD] l10n_it_edi_sdicoop: user settings for demo mode
- 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

closes odoo/odoo#84925

X-original-commit: c5d049c55d21f9885e79182df2bd5f433c5bb782
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-02-18 18:13:37 +00:00
Benjamin Frantzen (bfr) 1e53f20472 [FIX] account_edi_proxy_client, l10n_it_edi_sdicoop: do not make request in demo mode
When demo data is installed, requests to the proxy are blocked and we simulate a successful result by default and the proxy.
- an account_edi_proxy_client.user is created even though it's counterpart on the proxy doesn't exist.
- sending invoices is successfull and checking the status return simulate the invoice was accepted.
- the cron checking for incoming invoice returns immediatly and no new invoice is created.

closes odoo/odoo#72092

X-original-commit: 7be2e136c5e7a62d440f8323f36076d486976825
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-06-11 17:36:39 +00:00