Done through `oldname`.
@ -8,4 +8,5 @@ class AccountInvoice(models.Model):
_inherit = 'account.invoice'
# We keep this field for migration purpose
old_contract_id = fields.Many2one('contract.contract')
old_contract_id = fields.Many2one(
'contract.contract', oldname='contract_id')