mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[14.0][ADD] contract_split module
This commit is contained in:
26
contract_split/models/contract.py
Normal file
26
contract_split/models/contract.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# Copyright 2023 Damien Crier - Foodles
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class Contract(models.Model):
|
||||
_inherit = "contract.contract"
|
||||
|
||||
original_contract_id = fields.Many2one(
|
||||
comodel_name="contract.contract",
|
||||
readonly=True,
|
||||
)
|
||||
|
||||
|
||||
class ContractLine(models.Model):
|
||||
_inherit = "contract.line"
|
||||
|
||||
splitted_from_line_id = fields.Many2one(
|
||||
comodel_name="contract.line",
|
||||
readonly=True,
|
||||
)
|
||||
splitted_from_contract_id = fields.Many2one(
|
||||
comodel_name="contract.contract",
|
||||
readonly=True,
|
||||
)
|
||||
Reference in New Issue
Block a user