Files
stock-logistics-warehouse/account_move_line_stock_info/migrations/14.0.2.1.0/pre-migration.py
Jordi Ballester 186434f5e4 [IMP] account_move_line_stock_info: Add init hook
We want to make sure that we move the stock_move_id from the account.move
to the account.move.line
2022-08-26 11:24:23 +02:00

16 lines
471 B
Python

# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
# Part of ForgeFlow. See LICENSE file for full copyright and licensing details.
import logging
from odoo import SUPERUSER_ID, api
from odoo.addons.account_move_line_stock_info.hooks import post_init_hook
_logger = logging.getLogger(__name__)
def migrate(cr, version):
_logger.info("Trigger again the post_init_hook")
env = api.Environment(cr, SUPERUSER_ID, {})
post_init_hook(cr, env.registry)