Browse Source

[IMP] New module contract_line_extended.

Restores link between contract line (account.analytic.invoice.line) and contract
(account.analytic.account).
Also adds reference fields partner_id, date_start and date_end to contract line.
pull/175/head
Ronald Portier 7 years ago
parent
commit
75d4ea5be1
  1. 63
      contract_line_extended/README.rst
  2. 4
      contract_line_extended/__init__.py
  3. 18
      contract_line_extended/__manifest__.py
  4. 4
      contract_line_extended/models/__init__.py
  5. 21
      contract_line_extended/models/account_analytic_invoice_line.py

63
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
<https://github.com/OCA/contract/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 <ronald@therp.nl>
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.

4
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

18
contract_line_extended/__manifest__.py

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2018 Therp BV <https://therp.nl>.
# 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,
}

4
contract_line_extended/models/__init__.py

@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2018 Therp BV <https://therp.nl>.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import account_analytic_invoice_line

21
contract_line_extended/models/account_analytic_invoice_line.py

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Therp BV <https://therp.nl>.
# 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)
Loading…
Cancel
Save