oca-financial/odoo-bringout-oca-account-closing-account_cutoff_accrual_sale/account_cutoff_accrual_sale/hooks.py
Ernad Husremovic 048bcf5ec7 Move 28 account modules from oca-technical to existing oca-financial submodule
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-30 17:49:03 +02:00

13 lines
364 B
Python

# Copyright 2023 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
def post_init_hook(cr, registry):
cr.execute(
"""
UPDATE sale_order_line
SET is_cutoff_accrual_excluded = TRUE
WHERE order_id IN
( SELECT id FROM sale_order WHERE force_invoiced )
"""
)