Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] web.assets_common warning removed #127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
@@ -0,0 +1,2 @@
"*":
web.assets_common: "[17] Reference to 'web.assets_common'. This bundle has been removed from odoo, see https://github.com/odoo/odoo/pull/132190"
3 changes: 3 additions & 0 deletions tests/data_result/module_160_170/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
'data': [
'views/res_partner.xml',
],
"assets": {
"web.assets_common",
}
}
5 changes: 5 additions & 0 deletions tests/data_result/module_160_170/views/template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template id="tests_template" name="Test Template">
<t t-call="web.layout">
<t t-call-assets="web.assets_common" t-js="false"/>
</t>
</template>
3 changes: 3 additions & 0 deletions tests/data_template/module_160/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
'data': [
'views/res_partner.xml',
],
"assets": {
"web.assets_common",
}
}
5 changes: 5 additions & 0 deletions tests/data_template/module_160/views/template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template id="tests_template" name="Test Template">
<t t-call="web.layout">
<t t-call-assets="web.assets_common" t-js="false"/>
</t>
</template>
15 changes: 15 additions & 0 deletions tests/test_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,21 @@ def test_migration_160_170(self):
"Differences found in the following files\n- %s"
% ("\n- ".join(diff_files)),
)
log_content = _read_content(str(self._working_path / "test_log.log"))
required_logs = [
(
"WARNING",
"[17].*'web.assets_common'.*This bundle has been removed.*",
),
]
for required_log in required_logs:
level, message = required_log
pattern = "{0}.*{1}".format(level, message)
self.assertNotEqual(
len(re.findall(pattern, log_content)),
0,
"%s not found in the log" % pattern,
)

def test_migration_170_180(self):
self._migrate_module("module_170", "module_170_180", "17.0", "18.0")
Expand Down
Loading