mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
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.
22 lines
568 B
Python
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
|
|
)
|