-
-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] account_operating_unit: do not show inter-OU balance journals a…
…s invoice lines
- Loading branch information
1 parent
dfd2681
commit 4600b94
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
account_operating_unit/migrations/17.0.1.1.0/pre-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2024 ForgeFlow S.L. <https://www.forgeflow.com> | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
UPDATE account_move_line aml0 SET display_type = 'ou_balance' | ||
FROM account_move_line aml | ||
INNER JOIN res_company rc ON rc.id = aml.company_id | ||
WHERE aml.name = 'OU-Balancing' | ||
AND aml.account_id = rc.inter_ou_clearing_account_id | ||
AND rc.ou_is_self_balanced = true | ||
AND aml0.id = aml.id | ||
""", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters