mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[REF] Contract Sale Invoicing: update translations [IMP] - Assert that the predecessor is available for new link at uncancel [RMV] - remove usless changes [RMV] - Remove usless field recurring_invoices after the total isolation between contract model and account analytic one. recurring_invoices which was used to mark analytic account as contract became usless [IMP] - P3 syntax [IMP] - use @openupgrade.migrate() and openupgrade.logged_query [IMP] - drop transient table in migration script
17 lines
471 B
Python
17 lines
471 B
Python
# Copyright 2019 ACSONE SA/NV
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
import logging
|
|
|
|
from odoo import SUPERUSER_ID, api
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
def migrate(cr, version):
|
|
_logger.info(">> Post-Migration 12.0.3.0.0")
|
|
_logger.info("Populate invoicing partner field on contracts")
|
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
|
contracts = env["account.analytic.account"].search([])
|
|
contracts._inverse_partner_id()
|