mirror of
https://github.com/bringout/oca-financial.git
synced 2026-04-26 02:42:01 +02:00
29 lines
725 B
Python
29 lines
725 B
Python
def pre_init_hook(cr):
|
|
|
|
cr.execute(
|
|
"""
|
|
ALTER TABLE account_move ADD COLUMN IF NOT EXISTS amount_ecotax numeric
|
|
"""
|
|
)
|
|
cr.execute(
|
|
"""
|
|
UPDATE account_move SET amount_ecotax = 0.0 WHERE amount_ecotax IS NULL
|
|
"""
|
|
)
|
|
cr.execute(
|
|
"""
|
|
ALTER TABLE account_move_line ADD COLUMN IF NOT EXISTS subtotal_ecotax numeric
|
|
"""
|
|
)
|
|
cr.execute(
|
|
"""
|
|
ALTER TABLE account_move_line ADD COLUMN IF NOT EXISTS ecotax_amount_unit numeric
|
|
"""
|
|
)
|
|
cr.execute(
|
|
"""
|
|
UPDATE account_move_line
|
|
SET ecotax_amount_unit = 0.0, subtotal_ecotax = 0.0
|
|
WHERE ecotax_amount_unit IS NULL
|
|
"""
|
|
)
|