Skip to content

Commit

Permalink
[IMP] l10n_vn: The XML ID of account.account should be renamed.
Browse files Browse the repository at this point in the history
  • Loading branch information
anhbtit authored and phamgiang2510 committed Jul 4, 2024
1 parent bfa129c commit a356545
Showing 1 changed file with 198 additions and 0 deletions.
198 changes: 198 additions & 0 deletions openupgrade_scripts/scripts/l10n_vn/17.0.2.0.3/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,200 @@
"l10n_vn.tax_sale_vat5",
]

_account_account_xmlid = [
"l10n_vn.chart1121",
"l10n_vn.chart1122",
"l10n_vn.chart1123",
"l10n_vn.chart1211",
"l10n_vn.chart1212",
"l10n_vn.chart1218",
"l10n_vn.chart1281",
"l10n_vn.chart1282",
"l10n_vn.chart1283",
"l10n_vn.chart1288",
"l10n_vn.chart131",
"l10n_vn.chart132",
"l10n_vn.chart1331",
"l10n_vn.chart1332",
"l10n_vn.chart1361",
"l10n_vn.chart1362",
"l10n_vn.chart1363",
"l10n_vn.chart1368",
"l10n_vn.chart1381",
"l10n_vn.chart1385",
"l10n_vn.chart1388",
"l10n_vn.chart141",
"l10n_vn.chart151",
"l10n_vn.chart152",
"l10n_vn.chart1531",
"l10n_vn.chart1532",
"l10n_vn.chart1533",
"l10n_vn.chart1534",
"l10n_vn.chart1541",
"l10n_vn.chart1542",
"l10n_vn.chart1543",
"l10n_vn.chart1544",
"l10n_vn.chart1551",
"l10n_vn.chart1557",
"l10n_vn.chart1561",
"l10n_vn.chart1562",
"l10n_vn.chart1567",
"l10n_vn.chart157",
"l10n_vn.chart158",
"l10n_vn.chart1611",
"l10n_vn.chart1612",
"l10n_vn.chart171",
"l10n_vn.chart2111",
"l10n_vn.chart2112",
"l10n_vn.chart2113",
"l10n_vn.chart2114",
"l10n_vn.chart2115",
"l10n_vn.chart2118",
"l10n_vn.chart2121",
"l10n_vn.chart2122",
"l10n_vn.chart2131",
"l10n_vn.chart2132",
"l10n_vn.chart2133",
"l10n_vn.chart2134",
"l10n_vn.chart2135",
"l10n_vn.chart2136",
"l10n_vn.chart2138",
"l10n_vn.chart2141",
"l10n_vn.chart2142",
"l10n_vn.chart2143",
"l10n_vn.chart2147",
"l10n_vn.chart217",
"l10n_vn.chart221",
"l10n_vn.chart222",
"l10n_vn.chart2281",
"l10n_vn.chart2291",
"l10n_vn.chart2292",
"l10n_vn.chart2293",
"l10n_vn.chart2294",
"l10n_vn.chart2411",
"l10n_vn.chart2412",
"l10n_vn.chart2413",
"l10n_vn.chart242",
"l10n_vn.chart243",
"l10n_vn.chart244",
"l10n_vn.chart331",
"l10n_vn.chart33311",
"l10n_vn.chart33312",
"l10n_vn.chart3332",
"l10n_vn.chart3333",
"l10n_vn.chart3334",
"l10n_vn.chart3335",
"l10n_vn.chart3336",
"l10n_vn.chart3337",
"l10n_vn.chart33381",
"l10n_vn.chart33382",
"l10n_vn.chart3339",
"l10n_vn.chart3341",
"l10n_vn.chart3348",
"l10n_vn.chart335",
"l10n_vn.chart3361",
"l10n_vn.chart3362",
"l10n_vn.chart3363",
"l10n_vn.chart3368",
"l10n_vn.chart337",
"l10n_vn.chart3381",
"l10n_vn.chart3382",
"l10n_vn.chart3383",
"l10n_vn.chart3384",
"l10n_vn.chart3385",
"l10n_vn.chart3386",
"l10n_vn.chart3387",
"l10n_vn.chart3388",
"l10n_vn.chart3411",
"l10n_vn.chart3412",
"l10n_vn.chart3431",
"l10n_vn.chart34311",
"l10n_vn.chart34312",
"l10n_vn.chart34313",
"l10n_vn.chart3432",
"l10n_vn.chart344",
"l10n_vn.chart347",
"l10n_vn.chart3521",
"l10n_vn.chart3522",
"l10n_vn.chart3523",
"l10n_vn.chart3524",
"l10n_vn.chart3531",
"l10n_vn.chart3532",
"l10n_vn.chart3533",
"l10n_vn.chart3534",
"l10n_vn.chart3561",
"l10n_vn.chart3562",
"l10n_vn.chart357",
"l10n_vn.chart41111",
"l10n_vn.chart41112",
"l10n_vn.chart4112",
"l10n_vn.chart4113",
"l10n_vn.chart4118",
"l10n_vn.chart412",
"l10n_vn.chart4131",
"l10n_vn.chart4132",
"l10n_vn.chart414",
"l10n_vn.chart417",
"l10n_vn.chart418",
"l10n_vn.chart419",
"l10n_vn.chart4211",
"l10n_vn.chart4212",
"l10n_vn.chart441",
"l10n_vn.chart4611",
"l10n_vn.chart4612",
"l10n_vn.chart466",
"l10n_vn.chart5111",
"l10n_vn.chart5112",
"l10n_vn.chart5113",
"l10n_vn.chart5114",
"l10n_vn.chart5117",
"l10n_vn.chart5118",
"l10n_vn.chart515",
"l10n_vn.chart5211",
"l10n_vn.chart5212",
"l10n_vn.chart5213",
"l10n_vn.chart6111",
"l10n_vn.chart621",
"l10n_vn.chart622",
"l10n_vn.chart6231",
"l10n_vn.chart6232",
"l10n_vn.chart6233",
"l10n_vn.chart6234",
"l10n_vn.chart6237",
"l10n_vn.chart6238",
"l10n_vn.chart6271",
"l10n_vn.chart6272",
"l10n_vn.chart6273",
"l10n_vn.chart6274",
"l10n_vn.chart6277",
"l10n_vn.chart6278",
"l10n_vn.chart631",
"l10n_vn.chart632",
"l10n_vn.chart635",
"l10n_vn.chart6411",
"l10n_vn.chart6412",
"l10n_vn.chart6413",
"l10n_vn.chart6414",
"l10n_vn.chart6415",
"l10n_vn.chart6417",
"l10n_vn.chart6418",
"l10n_vn.chart6421",
"l10n_vn.chart6422",
"l10n_vn.chart6423",
"l10n_vn.chart6424",
"l10n_vn.chart6425",
"l10n_vn.chart6426",
"l10n_vn.chart6427",
"l10n_vn.chart6428",
"l10n_vn.chart711",
"l10n_vn.chart811",
"l10n_vn.chart8211",
"l10n_vn.chart8212",
"l10n_vn.chart911",
"l10n_vn.chart9993",
"l10n_vn.chart9994",
]


def _vn_coa_rename_xml_id(env):
"""
Expand All @@ -36,6 +230,10 @@ def _vn_coa_rename_xml_id(env):
old_xmlid = f"l10n_vn.{company_id}_" + tax_xmlid.split(".")[1]
new_xmlid = f"account.{company_id}_" + tax_xmlid.split(".")[1]
xmlids_renames.append((old_xmlid, new_xmlid))
for account_xmlid in _account_account_xmlid:
old_xmlid = f"l10n_vn.{company_id}_" + account_xmlid.split(".")[1]
new_xmlid = f"account.{company_id}_" + account_xmlid.split(".")[1]
xmlids_renames.append((old_xmlid, new_xmlid))
openupgrade.rename_xmlids(env.cr, xmlids_renames)


Expand Down

0 comments on commit a356545

Please sign in to comment.