Files
odoo_source/addons/stock_delivery/__init__.py
T
Valentin Vallaeys (vava) 23ab823668 [IMP] stock_delivery: remove dependency to sale_management
The dependency to sale_management is required to handle sale orders. But
sale orders can be handled in the ecommerce backend.
With this commit, installing stock_delivery will install `sale_management`
only if `website_sale` is not installed.

Part-of: odoo/odoo#123854
2023-06-16 13:41:04 +02:00

17 lines
592 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models
from . import wizard
def _auto_install_sale_app(env):
"""Make sure you have at least one "Sales" app to use the advanced delivery logic.
Either you have e-commerce (website_sale) or Sales (sale_management)
"""
if env['ir.module.module']._get('website_sale').state != 'uninstalled':
return
module_sale_management = env['ir.module.module']._get('sale_management')
if module_sale_management.state == 'uninstalled':
module_sale_management.button_install()