Brice bib Bartoletti d03a66c0c3 [FIX] account: prevent saving unbalanced misc
The aim of this commit is to prevent the user to save unbalanced misc entry
that wouldn't be created by adding a tax.

Context:
Since commit d8d47f9 we allow user to create unbalanced entries by
automatically balancing them on a suspense account. This isn't an issue but we
also allow to post those entries.
As the flow is smooth and fast, a quick user could just post this entries which
could be problematic.
Resetting to draft could be an option but that wouldn't be convenient if some
lines would have been reconciled. (which could have side effects in case
of there would be a cash basis tax on the line)
It's also impossible in case of a journal that would be hashed.
It also means that the problem would be delayed until the end of year
accounting processes, when accountants are tied to dead-lines.

Before this commit:
An unbalanced misc entry created manually would automatically be balanced with
a suspense account.

After this commit:
- Unbalanced misc entry can't be saved if there isn't any tax on it
- Unbalanced misc entry with a tax are balanced automatically.
- Unbalanced misc entry with a tax we are about to remove are balanced
automatically

closes odoo/odoo#110063

Community-pr: https://github.com/odoo/odoo/pull/109878
Task-id: 3129172
X-original-commit: c86786676b86381fbeeac9897508d3fe0ce77151
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-01-17 09:14:55 +01:00
…
2023-01-03 13:16:02 +01:00
2023-01-17 01:10:09 +01:00
2023-01-03 13:16:02 +01:00
…
…
…
…
2023-01-03 13:16:02 +01:00
…
2023-01-03 13:16:02 +01: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%