Metadata-Version: 2.1
Name: odoo-addon-contract
Version: 16.0.2.18.0
Summary: Recurring - Contracts Management
Home-page: https://github.com/OCA/contract
Author: Tecnativa, ACSONE SA/NV, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
License: AGPL-3
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 16.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: >=3.10
Requires-Dist: odoo<16.1dev,>=16.0a

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

================================
Recurring - Contracts Management
================================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:45856ebde9d9d6388519bd62eb6239d66243235d67ed7b5b6b95a34daf1c40d1
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
    :target: https://odoo-community.org/page/development-status
    :alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github
    :target: https://github.com/OCA/contract/tree/16.0/contract
    :alt: OCA/contract
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-contract
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=16.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module enables contracts management with recurring invoicing
functions.

It works for customer contract and supplier contracts.

A rich set of reccurence patterns are available.

You can print and send contracts by email. Contracts are shown in
portal.

A lot of additional features are available in the ``contract``
repository.

**Table of contents**

.. contents::
   :local:

Configuration
=============

To view discount field in contract line, you need to set *Discount on
lines* in user access rights.

Contract templates can be created from the *Configuration > Contracts >
Contract Templates* menu. They allow to define default **Journal**,
**Pricelist** and **Contract lines** when creating a contract.

To use it, just select the template on the contract and fields will be
filled automatically.

Usage
=====

Contracts are available in *Invoicing > Customers > Customer Contracts*
and *Invoicing > Vendors > Supplier Contracts*.

Click on **New** to create a new contact. Here is an overview:

|contract-overview|

Invoicing parameters :
----------------------

- the partner (customer or supplier depending on the type of contract)
- the **Journal** is filled with the default customer/supplier journal
  (first in sequence in *Configuration > Journals*)
- **Pricelist**, **Payment terms** and **Fiscal position** are filled in
  from the partner information, if available

Recurrence parameters :
-----------------------

- **Invoice every** : Invoicing interval, in terms of days, weeks,
  months, months last day, semesters or years
- **Start Date** of the contract, from which the invoicing period will
  start
- **End Date** of the contract is optional. If not filled the invoice
  generation will never stop.
- The **Date of Next Invoice** is automatically computed, but can be can
  be modified manually
- **Invoicing type** : pre-paid or post-paid. A pre-paid contract
  generates the invoice at the beginning of the invoicing period, a post
  paid contract generates it at the end.
- **Generation Type** has only one option "Invoice". Other options are
  added in separate modules.
- **Recurrence at lines level** : see below

Contract lines
--------------

These lines will be used to generate the invoice lines. You can fill in
the product with a description, a quantity and a price.

The **Description** can include the markers ``#START#``, ``#END#`` and
``#INVOICEMONTHNAME#`` in the description field. This will display the
start/end date or the start month of the invoiced period in the invoice
line description.

Check **Auto-price** for having the price automatically obtained and
updated from the price list.

Reccurence at lines level
-------------------------

**Recurrence at lines level** is a different "mode", where each contract
line has it's own recurrence properties. For instance, one line starts
on 02/02/2026 and is invoiced every 2 weeks, and another line starts on
04/04/2026 and is invoiced yearly.

However, this mode and offers more reccurrence features, besides those
already presented.

Contract lines are now opened in a form view.

|reccurence-line-level-overview|

**Auto-renew** : contract lines will be automatically renewed when the
**End Date** is reached. The End Date will be postponed by the duration
set in the **Renew Every** field.

The field **Termination Notice before** will set the duration before the
**End Date** when the contract line state will change from *In Progress*
to *Upocoming close*. By default, the state changes one month before the
**End Date**.

Lines can also be manually renewed in advance using the green **Renew**
button.

|contract-line-renew-button|

You can **Stop** a contract line using the red button at the right.

A pop up will open asking for an **Stop Date**. In a pre-paid contract,
this date must be after the end of the period already invoiced. For
instance, if the last invoice covers the period from 01/01/2026 to
31/01/2026, the stop date must be equal or after 31/01/2026.

You can also **Stop and plan a successor**. A popup will ask for a new
Start and End date. The contract line will be stopped and a new one will
be created with the given Start and End dates.

Invoice generation
------------------

The **Generate Recurring Invoices from Contracts** cron, available in
Settings > Technical > Automation > Scheduled Action, runs daily to
generate the invoices. Execution time and frequency can be configured in
the cron settings.

If you are in `debug
mode <https://www.odoo.com/documentation/16.0/fr/applications/general/developer_mode.html>`__,
you can click on the **Create Invoices** button.

|create-invoice-debug-mode|

Reporting
---------

The **Show recurring invoices** shortcut on contracts shows all invoices
created from the contract.

The menu *Invoicing > Reporting > Contracts > Customer Contract
Lines/Supplier Contract Lines* allows to view all contract lines in a
list view. Lines can be edited from there. Note : pivot view is not
available in this report.

Printing, sending by email and portal access
--------------------------------------------

The contract pdf report can be printed from the **Print** menu.

The contract can be sent by email with the **Send by Email** button

Contracts appear in portal to following users:

|contract-portal-view|

.. |contract-overview| image:: https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/contract-overview.png
.. |reccurence-line-level-overview| image:: https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/reccurence-line-level-overview.png
.. |contract-line-renew-button| image:: https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/contract-line-renew-button.png
.. |create-invoice-debug-mode| image:: https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/create-invoice-debug-mode.png
.. |contract-portal-view| image:: https://raw.githubusercontent.com/OCA/contract/16.0/contract/static/src/screenshots/contract-portal-view.png

Known issues / Roadmap
======================

- Recover states and others functional fields in Contracts.
- Add recurrence flag at template level.

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20contract%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Tecnativa
* ACSONE SA/NV

Contributors
------------

- Angel Moya <angel.moya@domatix.com>

- Dave Lasley <dave@laslabs.com>

- Miquel Raïch <miquel.raich@eficent.com>

- Souheil Bejaoui <souheil.bejaoui@acsone.eu>

- Thomas Binsfeld <thomas.binsfeld@acsone.eu>

- Guillaume Vandamme <guillaume.vandamme@acsone.eu>

- Raphaël Reverdy <raphael.reverdy@akretion.com>

- `Tecnativa <https://www.tecnativa.com>`__:

  - Pedro M. Baeza
  - Carlos Dauden
  - Vicent Cubells
  - Rafael Blasco
  - Víctor Martínez

- Iván Antón <ozono@ozonomultimedia.com>

- `[APSL] <https://www.apsl.tech>`__:

  - Antoni Marroig <amarroig@apsl.net>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

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.

This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/16.0/contract>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
