Files
stock-logistics-warehouse/stock_quant_cost_info/hooks.py
Carlos Roca 2c2f4d326a [MIG] stock_quant_cost_info: Migration to 15.0
- Module renamed from stock_inventory_cost_info to stock_quant_cost_info
- Add changes to allow show the cost difference when changing qty from stock.quants

TT36551
2023-05-08 15:49:54 -04:00

16 lines
360 B
Python

# Copyright 2019 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
def pre_init_hook(cr):
cr.execute(
"""ALTER TABLE stock_quant
ADD COLUMN adjustment_cost numeric
DEFAULT 0"""
)
cr.execute(
"""ALTER TABLE stock_quant
ALTER COLUMN adjustment_cost DROP DEFAULT;"""
)