Metadata-Version: 2.1
Name: odoo-addon-agreement
Version: 19.0.2.2.0.1
Requires-Dist: odoo==19.0.*
Summary: Adds an agreement object
Home-page: https://github.com/OCA/agreement
License: AGPL-3
Author: Akretion, Yves Goldberg (Ygol Internetwork), Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 19.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Development Status :: 4 - Beta
Description-Content-Type: text/x-rst

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

==========
Agreements
==========

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |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%2Fagreement-lightgray.png?logo=github
    :target: https://github.com/OCA/agreement/tree/19.0/agreement
    :alt: OCA/agreement
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/agreement-19-0/agreement-19-0-agreement
    :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/agreement&target_branch=19.0
    :alt: Try me on Runboat

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

This module adds an *Agreement* object to Odoo so that contracts and
other agreements concluded with customers and suppliers can be
registered and followed in one place. Each agreement has a code, a name,
a partner, a *Sale* or *Purchase* domain, and signature, start and end
dates. The partner may be a contact person of a company: the company is
stored on the agreement as *Commercial Entity*, and the agreement code
must be unique per commercial entity and company.

Agreements have a chatter with tracked field changes and activities, can
be archived, are listed on the partner form through a smart button, and
are protected by three access roles (Read-Only Users, User and Manager).
Optionally, agreements can be classified with *agreement types*, which
preset the domain, and flagged as *templates* that can be duplicated to
create new agreements.

This module is the base of the OCA agreement modules. Its settings page
lets you install extensions for stages, signatures, revisions,
termination, legal content, and links to sales, products, projects and
rebates.

**Table of contents**

.. contents::
   :local:

Use Cases / Context
===================

Companies sign many contracts with their customers and suppliers:
maintenance contracts, framework agreements, supply and service
agreements, non-disclosure agreements. Without a dedicated record, these
documents end up as attachments on a partner or on a sales order, and
nobody can quickly answer which agreements exist, with whom, and when
they start or end.

This module answers that need with a dedicated *Agreement* record. It is
deliberately minimal and only stores what every agreement has in common:
identification, partner, sale or purchase domain and dates. It also
provides the *Agreements* application menu, the access roles and the
settings page that the other modules of the OCA ``agreement`` repository
build upon, so a company installs only the features it needs:

- ``agreement_stage``: stage workflow for agreements.
- ``agreement_signature``: signatories and signed document of
  agreements.
- ``agreement_revision``: versions and revisions of agreements.
- ``agreement_termination``: term dates, notices and termination
  tracking.
- ``agreement_type``: hierarchical agreement types with sub-types.
- ``agreement_legal`` and ``agreement_legal_content``: legal aspects and
  legal content of agreements.
- ``agreement_sale``, ``agreement_product``, ``agreement_project`` and
  ``agreement_rebate``: links between agreements and sales, products,
  projects and rebates.

The module is multi-company aware: an agreement belongs to a company and
is only visible to users allowed to work in that company. Agreements
without a company are shared.

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

Access rights
-------------

The module creates an *Agreement* privilege with three roles. Assign
them in *Settings > Users & Companies > Users*, tab *Access Rights*:

- *Read-Only Users*: see the *Agreements* menu and read agreements.
- *User*: create, edit, delete and archive agreements, and read
  agreement types. When the module is installed, every existing internal
  user receives this role.
- *Manager*: in addition, manage agreement types and the *Agreements*
  settings.

Agreement types and agreement templates are available to every user with
one of these roles.

Settings
--------

Go to *Agreements > Configuration > Settings* (Manager role required).

|Agreements settings|

- *Advanced Features* offers shortcuts to the agreement types and
  agreement templates and lets you install the extension modules for
  signatures, termination, stages, hierarchical types, revisions and
  legal content.
- *Connections* lets you install the modules linking agreements to
  projects, sales, rebates and products.

Agreement types
---------------

Go to *Agreements > Configuration > Types* (Manager role required) and
create the types you need. Each type has a name and a default domain
(*Sale* or *Purchase*) that is applied to agreements of that type. Types
can be archived.

.. |Agreements settings| image:: https://raw.githubusercontent.com/OCA/agreement/19.0/agreement/static/description/screenshot_settings.png

Usage
=====

Create an agreement
-------------------

1. Go to *Agreements > Agreements* and click *New*.
2. Enter the *Agreement Name* and the *Code*. The code must be unique
   per commercial entity and company. Agreements are displayed as
   ``[code] name`` everywhere.
3. Select the *Partner*. You can pick a contact person of a company: the
   company is then shown as *Commercial Entity* above the partner.
4. Choose the *Domain*: *Sale* for agreements with customers, *Purchase*
   for agreements with suppliers. If you select an *Agreement Type*, the
   domain of the type is applied; you can still change it.
5. Enter the *Signature Date*, *Start Date* and *End Date*.
6. In a multi-company setup, check the *Company* of the agreement.

|Agreement form|

Changes to the code, name, partner, domain and dates are tracked in the
chatter, where you can also log notes, send messages and schedule
activities.

Find agreements
---------------

The agreement list can be searched by name or code and by partner. The
*Sale* and *Purchase* filters restrict the list to one domain, and the
*Archived* filter shows archived agreements. Group the list by partner,
commercial entity, signature date or domain. The *Commercial Entity*
column is optional and can be shown from the column selector.

|Agreement list grouped by commercial entity|

On the partner form, the *Agreements* smart button shows the number of
agreements linked directly to that partner and opens them. A new
agreement created from there is pre-filled with the partner.

|Agreements smart button on the partner form|

Duplicate and archive agreements
--------------------------------

- *Actions > Duplicate* copies an agreement. As the code must be unique,
  the copy gets the code of the original followed by *(copy)*.
- *Actions > Archive* hides an agreement without deleting it. Archived
  agreements are shown with the *Archived* filter and can be unarchived
  from there.

Agreement templates
-------------------

Templates are agreements used as a starting point for new agreements.
They do not require a partner and are not shown in the main agreement
list.

1. Go to *Agreements > Configuration > Templates* and create a template,
   or tick *Is a Template?* on an existing agreement.
2. To create an agreement from a template, open the template and use
   *Actions > Duplicate*. The copy is a regular agreement: the template
   flag is not copied. Rename it, set the code and the partner.

.. |Agreement form| image:: https://raw.githubusercontent.com/OCA/agreement/19.0/agreement/static/description/screenshot_form.png
.. |Agreement list grouped by commercial entity| image:: https://raw.githubusercontent.com/OCA/agreement/19.0/agreement/static/description/screenshot_list.png
.. |Agreements smart button on the partner form| image:: https://raw.githubusercontent.com/OCA/agreement/19.0/agreement/static/description/screenshot_partner.png

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

- The *Use agreement types* and *Use agreement template* toggles in
  *Agreements > Configuration > Settings* have no visible effect, as the
  *Read-Only Users* role already grants both features to all agreement
  users.
- The *Agreements > Reporting* menu is empty; entries are added by
  extension modules.
- The agreement code is entered manually; there is no sequence to
  generate it.
- The *Agreements* smart button on a company only counts agreements
  linked directly to the company, not those linked to its contact
  persons.

Changelog
=========

19.0.2.1.0 (2026-09-04)
-----------------------

- [IMP] Show the commercial entity in the agreement list and allow
  grouping agreements by commercial entity.

19.0.2.0.0 (2026-07-15)
-----------------------

- [ADD] *Read-Only Users*, *User* and *Manager* roles for agreements.
- [ADD] *Agreements* settings page with shortcuts to agreement types and
  templates and toggles to install the extension modules.

19.0.1.0.0 (2026-01-15)
-----------------------

- [MIG] Migration to Odoo 19.0.

18.0.1.1.0 (2025-09-22)
-----------------------

- [IMP] The *Agreements* smart button on the partner form moved from
  ``agreement_legal`` to this module.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/agreement/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/agreement/issues/new?body=module:%20agreement%0Aversion:%2019.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
-------

* Akretion
* Yves Goldberg (Ygol Internetwork)

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

- Alexis de Lattre <alexis.delattre@akretion.com>

- Yves Goldberg <yves@ygol.com>

- Alexandre Fayolle <alexandre.fayolle@camptocamp.com>

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

     - Sergio Teruel

- Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>

- `Acsone <https://www.acsone.eu/>`__:

  - Maxime Franco

- `Trobz <https://www.trobz.com/>`__:

  - Nhan Tran <nhant@trobz.com>

- `Komit <https://komit-consulting.com>`__:

  - Vang Nguyen Phu

- `glueckkanja AG <https://glueckkanja.com>`__:

  - Christopher Rogos

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.

.. |maintainer-ygol| image:: https://github.com/ygol.png?size=40px
    :target: https://github.com/ygol
    :alt: ygol
.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
    :target: https://github.com/alexis-via
    :alt: alexis-via

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ygol| |maintainer-alexis-via| 

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

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