-
-
Notifications
You must be signed in to change notification settings - Fork 344
Expand file tree
/
Copy pathhooks.py
More file actions
26 lines (21 loc) · 840 Bytes
/
Copy pathhooks.py
File metadata and controls
26 lines (21 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
def post_absorb_old_module(env):
if openupgrade.column_exists(env.cr, "account_tax", "vat_statement_account_id"):
query = """
UPDATE account_tax SET exclude_from_vat_settlements = True
WHERE vat_statement_account_id IS NULL;
"""
openupgrade.logged_query(env.cr, query)
def pre_absorb_old_module(env):
if openupgrade.is_module_installed(env.cr, "account_vat_period_end_statement"):
openupgrade.update_module_names(
env.cr,
[
(
"account_vat_period_end_statement",
"l10n_it_account_vat_period_end_settlement",
),
],
merge_modules=True,
)