Skip to content
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
1 change: 1 addition & 0 deletions product_multi_image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

from . import models
from .hooks import pre_init_hook
from .hooks import post_init_hook
3 changes: 2 additions & 1 deletion product_multi_image/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"license": "AGPL-3",
"website": "http://www.serviciosbaeza.com",
"category": "Sales Management",
#"pre_init_hook": "pre_init_hook",
"pre_init_hook": "pre_init_hook",
"post_init_hook": "post_init_hook",
"depends": [
"storage_image",
"product",
Expand Down
8 changes: 6 additions & 2 deletions product_multi_image/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

try:
from openerp.addons.base_multi_image.hooks import (
pre_init_hook_for_submodules)
from openerp.addons.storage_image.hooks import (
pre_init_hook_for_submodules,
post_init_hook_for_submodules)
except ImportError:
# Don't complain, as this will be solved as dependency when needed
pass


def pre_init_hook(cr):
pre_init_hook_for_submodules(cr, "product.template", "image")

def post_init_hook(cr, registry):
post_init_hook_for_submodules(cr, "product.template", "image", "name")