alsh-odoo 2331165bd0 [FIX] l10n_it_edi: set default 'demo' for l10n_it_edi_sdicoop_demo_mode
This traceback arises when the user tries to activate
'l10n_it_edi_sdicoop_register' without 'l10n_it_edi_sdicoop_demo_mode'.

To reproduce this issue:

1) Install 'l10n_it_edi' without demo data
2) Open 'Invoice/Customers/Customers'
3) Set the value of 'Codice Fiscale' field for all customers
4) Go to the 'Configuration/Settings/Electronic Document Invoicing' block
5) Now activate 'Allow Odoo to process invoices' twice

Error:- "KeyError: False"

[1] On the '_set_l10n_it_edi_sdicoop_register_demo_mode' method,
'edi_mode' variable is getting value through 'l10n_it_edi_sdicoop_demo_mode'.

When the user is not activated 'l10n_it_edi_sdicoop_demo_mode', 'edi_mode'
value will be 'False'.

Here 'edi_mode' is used in '_create_proxy_user' method and in that
'_create_proxy_user' the '_register_proxy_user' method is used, in
which the 'response' variable is getting value with the help of
'_get_server_url'method.

[2] But '_get_server_url' method returns 'proxy_urls[proxy_type][edi_mode]'.

Because the user did not selected'l10n_it_edi_sdicoop_demo_mode',
the 'edi_mode' value will be 'False', Which leads to the above traceback.

This commit will resolve the above issue by selecting default value 'demo',
if no 'l10n_it_edi_sdicoop_demo_mode'.

See:-
[1]
https://github.com/odoo/odoo/blob/8a13ca14d3fd251bbf85b1d8949b9d3c6ea76119/addons/l10n_it_edi/models/res_config_settings.py#L81-L92

[2]
https://github.com/odoo/odoo/blob/8a13ca14d3fd251bbf85b1d8949b9d3c6ea76119/addons/account_edi_proxy_client/models/account_edi_proxy_user.py#L84-L89

Sentry-4457787457

closes odoo/odoo#136771

X-original-commit: d6f9a0015c9f82fd7719883f604ad4d808332485
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2023-10-03 06:16:45 +00:00
…
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%