oca-financial/odoo-bringout-oca-account-closing-account_cutoff_accrual_purchase/account_cutoff_accrual_purchase/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
372 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 purchase_order_line
SET is_cutoff_accrual_excluded = TRUE
WHERE order_id IN
( SELECT id FROM purchase_order WHERE force_invoiced )
"""
)