Skip to content

Commit

Permalink
[IMP] openupgrade_framework v17
Browse files Browse the repository at this point in the history
  • Loading branch information
duong77476-viindoo committed May 22, 2024
1 parent c2ee1d4 commit f729510
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,29 +64,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 f729510

Please sign in to comment.