Files
contract/contract/models/account_move.py
Pedro M. Baeza 1a31ec1ee7 [IMP+REF] contract: Allow to set recurrency at header level
Big refactoring for allowing to define recurrency at header level for simplifying
the use of the module for most of the cases where you don't need different
recurrency at line level.
2024-03-23 15:10:10 +00:00

22 lines
568 B
Python

# Copyright 2016 Tecnativa - Carlos Dauden
# Copyright 2018 ACSONE SA/NV.
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountMove(models.Model):
_inherit = "account.move"
# We keep this field for migration purpose
old_contract_id = fields.Many2one("contract.contract")
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
contract_line_id = fields.Many2one(
"contract.line", string="Contract Line", index=True
)