Soam (sold) 7023540059 [FIX] l10n_it_edi: add flexible predictions
Odoo may allow prediction to occur when importing an EDI.
i.e. predicting the product, account and taxes of each line.
By default, those predictions will overwrite the actual value.

Though it may be helpful in some cases, there should be a way
to opt-out of the this automatic overwrite and to have a more
flexible way to do those predictions.

Here is how this is now possible:
1. With `disable_onchange_name_predictive` one can
indicate their desire to opt-out of the prediction overwrite
(i.e. the default behavior).
2. They can then use the `_predict_product`, `_predict_account`,
`_predict_taxes` methods to create their own way of prediction.
Placeholders for those were created to allow their use even if the
prediction module isn't present.

NB: As the module in charge of predictions (`account_accountant`)
is not always installed the `edi_prediction_enabled` context key is
used to indicate whether the prediction methods can be used or not.
In the case of this fix, the key is setup in the `l10n_it_reports`
module, as this module is always installed if `account_accountant`
and `l10n_it` are installed.

This way of predicting is useful for cases demanding a less generic
approach to prediction. e.g. For the Italian EDI module the account
of a line can be predicted without any limitation as it is not a value
imported by the EDI. Whereas, its product and taxes should be predicted
only if none were imported.

opw-3201391
opw-3172035

closes odoo/odoo#144437

X-original-commit: 9a87ec149a95239fbfceee60c2aecf4322fa964a
Related: odoo/enterprise#51901
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Soam Le Dortz (sold) <sold@odoo.com>
2023-12-01 14:23:42 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +00:00
2023-11-20 04:58:31 +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%