mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 07:32:08 +02:00
17.0 vanilla
This commit is contained in:
parent
2e65bf056a
commit
df627a6bba
328 changed files with 578149 additions and 759311 deletions
|
|
@ -1,6 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from contextlib import suppress
|
||||
|
||||
import odoo
|
||||
import logging
|
||||
|
||||
|
|
@ -17,8 +19,8 @@ def get_installed_modules(cursor):
|
|||
def get_neutralization_queries(modules):
|
||||
# neutralization for each module
|
||||
for module in modules:
|
||||
filename = odoo.modules.get_module_resource(module, 'data/neutralize.sql')
|
||||
if filename:
|
||||
filename = f'{module}/data/neutralize.sql'
|
||||
with suppress(FileNotFoundError):
|
||||
with odoo.tools.misc.file_open(filename) as file:
|
||||
yield file.read().strip()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue