Skip to content

Commit

Permalink
[IMP] openupgrade_framework v17
Browse files Browse the repository at this point in the history
-This commit remove unecessary patch
  • Loading branch information
duong77476-viindoo committed May 22, 2024
1 parent c2ee1d4 commit 81bc5f3
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
from openupgradelib import openupgrade

from odoo import api, models
from odoo.tools import mute_logger

from odoo.addons.base.models.ir_model import (
IrModel,
IrModelData,
IrModelFields,
IrModelRelation,
IrModelSelection,
)

Expand Down Expand Up @@ -64,29 +62,6 @@ def _module_data_uninstall(self, modules_to_remove):
IrModelData._module_data_uninstall = _module_data_uninstall


@api.model
def _process_end(self, modules):
"""Don't warn about upgrade conventions from Odoo
('fields should be explicitly removed by an upgrade script')
"""
with mute_logger("odoo.addons.base.models.ir_model"):
return IrModelData._process_end._original_method(self, modules)


_process_end._original_method = IrModelData._process_end
IrModelData._process_end = _process_end


def _module_data_uninstall(self):
"""Don't delete many2many relation tables. Only unlink the
ir.model.relation record itself.
"""
self.unlink()


IrModelRelation._module_data_uninstall = _module_data_uninstall


def _process_ondelete(self):
"""Don't break on missing models when deleting their selection fields"""
to_process = self.browse([])
Expand Down

0 comments on commit 81bc5f3

Please sign in to comment.