| 1 |
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 2 |
|
| 3 |
from . import models |
| 4 |
from . import report |
| 5 |
from . import wizard |
| 6 |
|
| 7 |
from odoo import Command |
| 8 |
|
| 9 |
|
| 10 |
def _enable_tracking_numbers(env): |
| 11 |
""" This hook ensures the tracking numbers are enabled when the module is installed since the |
| 12 |
user can install `product_expiry` manually without enable `group_production_lot`. |
| 13 |
""" |
| 14 |
group_production_lot = env.ref('stock.group_production_lot') |
| 15 |
groups = env.ref('base.group_user') + env.ref('base.group_portal') |
| 16 |
groups.write({'implied_ids': [Command.link(group_production_lot.id)]}) |