[OU-FIX] account_payment_order: Rename record rules XML-IDs

When coming from Odoo 8.0 with `account_payment` module installed, you
have 2 record rules for accesing payment orders and lines:

9e8f70e484/addons/account_payment/security/account_payment_security.xml (L16-L28)

so we need to convert them to the new existing rules for not having
duplicates, or remove them:

8b6300243a/account_payment_order/security/payment_security.xml (L17-L27)

I have decided to rename the XML-IDs for preserving the old ones.
This commit is contained in:
Pedro M. Baeza
2022-04-04 20:42:47 +02:00
parent 8b6300243a
commit 88ffbe5078

View File

@@ -61,6 +61,18 @@ column_renames_payment_transfer = {
],
}
xmlids_renames = [
(
"account_payment_order.payment_order_comp_rule",
"account_payment_order.account_payment_order_company_rule",
),
(
"account_payment_order.payment_line_comp_rule",
"account_payment_order.account_payment_line_company_rule",
),
]
# They are being handled after module rename, so source module name is correct
EXISTING_PAYMENT_MODE_TYPE_XML_IDS = {
'account_payment_order.manual_bank_tranfer':
@@ -238,4 +250,5 @@ def migrate(env, version):
merge_modules=True)
openupgrade.rename_models(env.cr, models_renames)
openupgrade.rename_tables(env.cr, table_renames)
openupgrade.rename_xmlids(env.cr, xmlids_renames)
populate_computed_fields(env)