diff --git a/contract_line_extended/README.rst b/contract_line_extended/README.rst new file mode 100644 index 00000000..4804db8b --- /dev/null +++ b/contract_line_extended/README.rst @@ -0,0 +1,63 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +====================== +Contract line extended +====================== + +Defines a number of related fields from account_analytic_account to +make it easy to search/select contract lines on partner, or start/end date +of the contract. + +Configuration +============= + +There is no specific configuration for this module. + +Usage +===== + +This module is a technical module, needed for modules that need to select +contract lines by partner, or from other referential fields from the +contract. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/110/10.0 + +Known issues / Roadmap +====================== + +None. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ + +* Ronald Portier + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/contract_line_extended/__init__.py b/contract_line_extended/__init__.py new file mode 100644 index 00000000..8d5680b7 --- /dev/null +++ b/contract_line_extended/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Therp BV. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import models diff --git a/contract_line_extended/__manifest__.py b/contract_line_extended/__manifest__.py new file mode 100644 index 00000000..a324f128 --- /dev/null +++ b/contract_line_extended/__manifest__.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# Copyright 2017-2018 Therp BV . +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + 'name': 'Contract Line Extended', + 'version': '10.0.1.0.0', + 'category': 'Contract Management', + 'license': 'AGPL-3', + 'author': "Therp BV, " + "Odoo Community Association (OCA)", + 'website': 'https://github.com/oca/contract', + 'depends': [ + 'contract', + ], + 'data': [ + ], + 'installable': True, +} diff --git a/contract_line_extended/models/__init__.py b/contract_line_extended/models/__init__.py new file mode 100644 index 00000000..d9d3affa --- /dev/null +++ b/contract_line_extended/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Copyright 2017-2018 Therp BV . +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import account_analytic_invoice_line diff --git a/contract_line_extended/models/account_analytic_invoice_line.py b/contract_line_extended/models/account_analytic_invoice_line.py new file mode 100644 index 00000000..80337acd --- /dev/null +++ b/contract_line_extended/models/account_analytic_invoice_line.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Copyright 2018 Therp BV . +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import fields, models + + +class AccountAnalyticInvoiceLine(models.Model): + _inherit = 'account.analytic.invoice.line' + + partner_id = fields.Many2one( + related='analytic_account_id.partner_id', + store=True, + readonly=True) + date_start = fields.Date( + related='analytic_account_id.date_start', + store=True, + readonly=True) + date_end = fields.Date( + related='analytic_account_id.date_end', + store=True, + readonly=True)