[IMP] add bool is_created_by_warehouse on locations
This commit is contained in:
10
stock_location_simple/hooks.py
Normal file
10
stock_location_simple/hooks.py
Normal file
@@ -0,0 +1,10 @@
|
||||
# Copyright 2021 Akretion (https://www.akretion.com).
|
||||
# @author Sébastien BEAU <sebastien.beau@akretion.com>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import SUPERUSER_ID, api
|
||||
|
||||
|
||||
def post_init_hook(cr, registry):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
env["stock.warehouse"].search([])._check_locations_created_by_warehouse()
|
||||
Reference in New Issue
Block a user