Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging

from odoo import api
from odoo.exceptions import ValidationError
from odoo.modules.module import get_resource_from_path
from odoo.tools import mute_logger
Expand All @@ -13,9 +12,8 @@
_logger = logging.getLogger(__name__)


@api.constrains("arch_db")
def _check_xml(self):
"""Don't raise or log exceptions in view validation unless explicitely
"""Don't raise or log exceptions in view validation unless explicitly
requested. Mute warnings about views which are common during migration."""
with mute_logger("odoo.addons.base.models.ir_ui_view"):
try:
Expand All @@ -35,7 +33,7 @@ def _check_xml(self):
def _raise_view_error(
self, message, node=None, *, from_exception=None, from_traceback=None
):
"""Don't raise or log exceptions in view validation unless explicitely
"""Don't raise or log exceptions in view validation unless explicitly
requested
"""
raise_exception = self.env.context.get("raise_view_error")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def _update_from_database(self, *args, **kwargs) -> None:

if os.environ.get("OPENUPGRADE_USE_DEMO", "") == "yes":
return

if (
"base" in self._modules
and self._modules["base"].demo
Expand Down
44 changes: 44 additions & 0 deletions openupgrade_scripts/apriori.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# Renamed modules is a mapping from old module name to new module name
renamed_modules = {
# odoo
"l10n_ec_website_sale": "l10n_ec_sale",
"l10n_in_edi_ewaybill": "l10n_in_ewaybill",
"membership": "partnership",
"pos_viva_wallet": "pos_viva_com",
"web_editor": "html_builder",
# odoo/enterprise
# OCA/...
}
Expand All @@ -13,18 +18,57 @@
# preexisting module names
merged_modules = {
# odoo
"account_edi_ubl_cii_tax_extension": "account_edi_ubl_cii",
"account_peppol_selfbilling": "account_peppol",
"auth_totp_mail_enforce": "auth_totp_mail",
"hr_contract": "hr",
"hr_holidays_contract": "hr_holidays",
"hr_work_entry_contract": "hr_work_entry",
"l10n_es_modelo130": "l10n_es",
"l10n_id_efaktur": "l10n_id_efaktur_coretax",
"l10n_in_gstin_status": "l10n_in",
"l10n_in_withholding": "l10n_in",
"l10n_in_withholding_payment": "l10n_in",
"l10n_it_edi_ndd": "l10n_it_edi",
"l10n_it_edi_ndd_account_dn": "l10n_it_edi",
"l10n_it_edi_website_sale": "l10n_it_edi",
"l10n_it_edi_withholding": "l10n_it_edi",
"l10n_jo_edi_extended": "l10n_jo_edi",
"l10n_my_edi_extended": "l10n_my_edi",
"l10n_pe_website_sale": "l10n_pe",
"l10n_pl_taxable_supply_date": "l10n_pl",
"l10n_ro_efactura_synchronize": "l10n_ro_edi",
"payment_razorpay_oauth": "payment_razorpay",
"pos_epson_printer": "point_of_sale",
"pos_self_order_epson_printer": "pos_self_order",
"sale_async_emails": "sale",
"website_membership": "website_crm_partner_assign",
# odoo/enterprise
# OCA/...
}

# only used here for upgrade_analysis
renamed_models = {
# odoo
"account_peppol.service.wizard": "peppol.config.wizard",
"hr.attendance.overtime": "hr.attendance.overtime.line",
"hr.candidate.skill": "hr.applicant.skill",
"hr.contract": "hr.version",
"mail.wizard.invite": "mail.followers.edit",
"mrp.batch.produce": "mrp.production.serials",
"procurement.group": "stock.reference",
"product.packaging": "product.uom",
"stock.package_level": "stock.package.history",
"stock.quant.package": "stock.package",
"web_editor.assets": "website.assets",
"web_editor.converter.test": "html_editor.converter.test",
"web_editor.converter.test.sub": "html_editor.converter.test.sub",
# OCA/...
}

# only used here for upgrade_analysis
merged_models = {
# odoo
"hr.candidate": "hr.applicant",
# OCA/...
}