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
17 lines
592 B
Python
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()
|