[IMP] add bool is_created_by_warehouse on locations

This commit is contained in:
clementmbr
2024-05-27 20:40:51 -03:00
parent 5023839119
commit c7172a5c7f
8 changed files with 68 additions and 1 deletions

View 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()