mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
* Remove incorrect oldname attributes. * Add filter on partners for running contracts (+ a support o2m field for that). * Cover more tables in model renaming + cleaner code using a loop. * Don't copy contract lines, but rename table + copy contract records on pre. * Contract code is now populated to "Reference/Description" field in invoice. * Order on new contract model has been restored to the same as old analytic accounts.
23 lines
721 B
Python
23 lines
721 B
Python
# Copyright 2004-2010 OpenERP SA
|
|
# Copyright 2014 Angel Moya <angel.moya@domatix.com>
|
|
# Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>
|
|
# Copyright 2016-2018 Carlos Dauden <carlos.dauden@tecnativa.com>
|
|
# Copyright 2016-2017 LasLabs Inc.
|
|
# Copyright 2018 ACSONE SA/NV
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class ContractTemplate(models.Model):
|
|
_name = 'contract.template'
|
|
_inherit = 'contract.abstract.contract'
|
|
_description = "Contract Template"
|
|
|
|
contract_line_ids = fields.One2many(
|
|
comodel_name='contract.template.line',
|
|
inverse_name='contract_id',
|
|
copy=True,
|
|
string='Contract template lines',
|
|
)
|