forked from OCA/sale-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhooks.py
More file actions
24 lines (19 loc) · 698 Bytes
/
hooks.py
File metadata and controls
24 lines (19 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright 2024 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
import logging
import pkg_resources
from odoo.modules.module import get_manifest
_logger = logging.getLogger(__name__)
def post_load():
account_invoice_triple_discount_manifest = get_manifest(
"account_invoice_triple_discount"
)
if not pkg_resources.parse_version(
account_invoice_triple_discount_manifest["version"]
) >= pkg_resources.parse_version("16.0.2.0.0"):
msg = (
"Module sale_triple_discount requires module "
"account_invoice_triple_discount >= 16.0.2.0.0"
)
_logger.error(msg)
raise Exception(msg)