mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-26 02:32:00 +02:00
16 lines
605 B
Python
16 lines
605 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import models
|
|
from . import report
|
|
from . import wizard
|
|
|
|
from odoo import Command
|
|
|
|
|
|
def _enable_tracking_numbers(env):
|
|
""" This hook ensures the tracking numbers are enabled when the module is installed since the
|
|
user can install `product_expiry` manually without enable `group_production_lot`.
|
|
"""
|
|
group_production_lot = env.ref('stock.group_production_lot')
|
|
groups = env.ref('base.group_user') + env.ref('base.group_portal')
|
|
groups.write({'implied_ids': [Command.link(group_production_lot.id)]})
|