Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0] [MIG] agreement_legal agreement_legal_sale agreement_sale agreement agreement_serviceprofile base_contract Migration to v14.0 #566

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions agreement_legal/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
================
Agreements Legal
================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/licence-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/12.0/agreement_legal
:alt: OCA/contract
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/110/12.0
:alt: Try me on Runbot

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

This module allows you to manage agreements, letter of intent and contract content.
The module is meant to be used by the legal team of a company and to allow them
to define sections, clauses and templates with their respective content that can
be dynamic.

Based on the template, an agreement can be created and the pdf document generated.

The agreement would go through a workflow to finally become a contract with the
customer signature.

**Table of contents**

.. contents::
:local:

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

To configure this module:

* Go to Agreement > Configuration > Templates
* Create a new template with sections and clauses and their respective content
* Go to Agreement > Configuration > Stages
* Create and reorder stages to match your process

Usage
=====

To use this module:

* Go to Agreement > Agreements
* Create a new agreement
* Select a template
* Follow the process to get the required approval
* Send the invitation to the customer to review and sign the agreement

* Define Field using widget domain but having partial_use option true:
* For Ex:
* <field name="field_domain" widget="domain" nolabel="1"
* options="{'model': 'agreement.recital',
* 'partial_use': True}"/>

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

* Split the module to remove the dependencies on sale and account and provide
the same feature in extra modules (agreement_sale, agreement_account,
agreement_purchase)

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 <https://github.com/OCA/contract/issues/new?body=module:%20agreement_legal%0Aversion:%2012.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
~~~~~~~

* Pavlov Media
* Open Source Integrators
* Yves Goldberg (Ygol Internetwork)

Contributors
~~~~~~~~~~~~

* Patrick Wilson <[email protected]>
* Bhavesh Odedra <[email protected]>
* Wolfgang Hall <[email protected]>
* Maxime Chambreuil <[email protected]>
* Sandip Mangukiya <[email protected]>
* Yves Goldberg <[email protected]>

Other credits
~~~~~~~~~~~~~

The development of this module has been financially supported by:

* Pavlov Media
* Open Source Integrators
* Yves Goldberg

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-max3903| image:: https://github.com/max3903.png?size=40px
:target: https://github.com/max3903
:alt: max3903
.. |maintainer-ygol| image:: https://github.com/ygol.png?size=40px
:target: https://github.com/ygol
:alt: ygol

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

|maintainer-max3903| |maintainer-ygol|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
12 changes: 12 additions & 0 deletions agreement_legal/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, SUPERUSER_ID
from . import models


def post_init_agreement_legal(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, dict())
cr.execute('UPDATE agreement SET stage_id = %s WHERE stage_id IS NULL;',
(env.ref('agreement_legal.agreement_stage_new').id,))
return True
51 changes: 51 additions & 0 deletions agreement_legal/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Agreements Legal",
"summary": "Manage Agreements, LOI and Contracts",
"author": "Pavlov Media, "
"Open Source Integrators, "
"Yves Goldberg (Ygol Internetwork), "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/contract",
"category": "Partner",
"license": "AGPL-3",
"version": "14.0.1.0.0",
"depends": ["base", "base_setup", "contacts", "base_contract", "product"],
"data": [
"data/ir_sequence.xml",
"data/module_category.xml",
"data/agreement_stage.xml",
"data/agreement_type.xml",
"security/res_groups.xml",
"security/ir.model.access.csv",
"report/agreement.xml",
"views/res_config_settings.xml",
"views/agreement_appendix.xml",
"views/agreement_clause.xml",
"views/agreement_recital.xml",
"views/agreement_section.xml",
"views/agreement_stages.xml",
"views/agreement_type.xml",
"views/agreement_subtype.xml",
"views/agreement_renewaltype.xml",
"views/agreement_increasetype.xml",
"views/res_partner.xml",
"views/agreement.xml",
"views/menu.xml",
],
"demo": [
"demo/demo.xml"
],
'qweb': [
"static/src/xml/domain_widget_view.xml"
],
"post_init_hook": "post_init_agreement_legal",
"application": True,
"development_status": "Beta",
"maintainers": [
"max3903",
"ygol"
],
}
58 changes: 58 additions & 0 deletions agreement_legal/data/agreement_stage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0"?>
<odoo>

<record id="agreement_stage_new" model="agreement.stage">
<field name="name">New</field>
<field name="sequence">10</field>
<field name="stage_type">agreement</field>
</record>

<record id="agreement_stage_draft" model="agreement.stage">
<field name="name">Draft</field>
<field name="sequence">20</field>
<field name="stage_type">agreement</field>
</record>

<record id="agreement_stage_reviewed" model="agreement.stage">
<field name="name">Reviewed</field>
<field name="sequence">30</field>
<field name="stage_type">agreement</field>
</record>

<record id="agreement_stage_negotiation" model="agreement.stage">
<field name="name">Negotiation</field>
<field name="sequence">40</field>
<field name="stage_type">agreement</field>
</record>

<record id="agreement_stage_out" model="agreement.stage">
<field name="name">Out for Customer Signature</field>
<field name="sequence">50</field>
<field name="stage_type">agreement</field>
</record>

<record id="agreement_stage_internal" model="agreement.stage">
<field name="name">Waiting Internal Signature</field>
<field name="sequence">60</field>
<field name="stage_type">agreement</field>
</record>

<record id="agreement_stage_active" model="agreement.stage">
<field name="name">Active</field>
<field name="sequence">70</field>
<field name="stage_type">agreement</field>
</record>

<record id="agreement_stage_expired" model="agreement.stage">
<field name="name">Expired</field>
<field name="sequence">80</field>
<field name="stage_type">agreement</field>
</record>

<record id="agreement_stage_cancelled" model="agreement.stage">
<field name="name">Cancelled</field>
<field name="sequence">100</field>
<field name="fold">True</field>
<field name="stage_type">agreement</field>
</record>
</odoo>
16 changes: 16 additions & 0 deletions agreement_legal/data/agreement_type.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<odoo>

<record id="agreement_type_agreement" model="agreement.type">
<field name="name">Agreement</field>
</record>

<record id="agreement_type_contract" model="agreement.type">
<field name="name">Contract</field>
</record>

<record id="agreement_type_loi" model="agreement.type">
<field name="name">Letter of Intent</field>
</record>

</odoo>
13 changes: 13 additions & 0 deletions agreement_legal/data/ir_sequence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">

<!-- Sequence for agreement -->
<record id="seq_agreement" model="ir.sequence">
<field name="name">Agreements</field>
<field name="code">agreement</field>
<field name="prefix">AG</field>
<field name="padding">3</field>
<field name="company_id" eval="False"/>
</record>

</odoo>
9 changes: 9 additions & 0 deletions agreement_legal/data/module_category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<record id="agreement" model="ir.module.category">
<field name="name">Agreement</field>
<field name="sequence">80</field>
</record>

</odoo>
40 changes: 40 additions & 0 deletions agreement_legal/demo/demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2019 Ygol Internetwork ([email protected])
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->

<odoo noupdate="1">

<record id="agreement.market1" model="agreement">
<field name="description">Hardware IT (C2C-IT0042)</field>
<field name="agreement_type_id" ref="agreement_type_agreement"/>
</record>

<record id="agreement.market2" model="agreement">
<field name="description">Fiber access office Lausanne (C2C-IT0043)</field>
<field name="agreement_type_id" ref="agreement_type_contract"/>
</record>

<record id="agreement.market3" model="agreement">
<field name="description">Vétérinaire (AGR-VETO001)</field>
<field name="agreement_type_id" ref="agreement_type_loi"/>
</record>

<record id="agreement.market4" model="agreement">
<field name="description">Wazo IPBX deployment and maintenance (AGR-TEL001)</field>
<field name="agreement_type_id" ref="agreement_type_loi"/>
</record>

<record id="agreement.market5" model="agreement">
<field name="description">SIP Phones supply (BUY-VOIP012)</field>
<field name="agreement_type_id" ref="agreement_type_agreement"/>
</record>

<record id="agreement.market6" model="agreement">
<field name="is_template">True</field>
<field name="description">SIP-ISDN gateways (BUY-VOIP013)</field>
<field name="agreement_type_id" ref="agreement_legal.agreement_type_contract"/>
</record>

</odoo>
Loading