Skip to content

Commit

Permalink
[MIG] openupgrade_framework v17
Browse files Browse the repository at this point in the history
-This commit remove unecessary patch
-Check if test exist then execute it in the test.yml
-Remove the test loader from patch, detail at
OCA#4327 (comment)
  • Loading branch information
duong77476-viindoo committed May 23, 2024
1 parent 1bd694a commit 52de874
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 78 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ jobs:
pip install asn1crypto
- name: Test data
run: |
for snippet in openupgrade/openupgrade_scripts/scripts/*/*/tests/data*.py; do
odoo-old/odoo-bin shell -d $DB < $snippet
done
if test -n "$(ls openupgrade/openupgrade_scripts/scripts/*/*/tests/data*.py 2> /dev/null)"; then
for snippet in openupgrade/openupgrade_scripts/scripts/*/*/tests/data*.py; do
odoo-old/odoo-bin shell -d $DB < $snippet
done
fi
- name: OpenUpgrade test
run: |
# select modules and perform the upgrade
Expand Down
2 changes: 1 addition & 1 deletion openupgrade_framework/odoo_patch/odoo/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import addons, api, models, modules, tests
from . import addons, api, models, modules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from openupgradelib import openupgrade

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

from odoo.addons.base.models.ir_model import (
IrModel,
Expand Down Expand Up @@ -64,19 +63,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.
Expand Down
1 change: 0 additions & 1 deletion openupgrade_framework/odoo_patch/odoo/tests/__init__.py

This file was deleted.

59 changes: 0 additions & 59 deletions openupgrade_framework/odoo_patch/odoo/tests/loader.py

This file was deleted.

0 comments on commit 52de874

Please sign in to comment.