Files
bank-payment/account_payment_order/migrations/12.0.2.0.0/post-migration.py

14 lines
377 B
Python

# Copyright 2021 Hunki Enterprises BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
for order in env['account.payment.order'].search([
('state', '=', 'uploaded'),
]):
if order._all_lines_reconciled():
order.action_done()