william-andre b4de10fdc5 [FIX] account,*: remove manual use of check_move_validity
TLDR: the context key `check_move_validity` should never be used
explicitly.

`check_move_validity` is a context key used to disable some important
integrity check in accounting: `debit=credit`, which is one of the most
fundamental rule.
It is possible to disable this in some cases, when creating and updating
lines one by one, since the constraint cannot be satisfied between each
line if the operations are not atomic.

A mechanism has been created for this, with `_check_balanced`. It is a
context manager using `_disable_recursion`, which will taint all
the contexts while inside of the context manager.
Putting any code changing lines one by one inside of that context
manager will then allow having a transient invalid state, but still
always check the validity at the end, when exiting the context.

That context key has been kept only in `point_of_sale` because a special
wizard is used there to be able to validate a session with an unbalanced
move, but a wizard is then in charge of balancing it. The check is then
done at that time.

closes odoo/odoo#146824

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-01-18 13:46:49 +00:00
2024-01-16 09:55:28 +00:00
2024-01-16 22:40:02 +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%