Compare commits

...

No commits in common. '12.0' and '11.0' have entirely different histories.
12.0 ... 11.0

  1. 1
      .gitignore
  2. 16
      .travis.yml
  3. 10
      README.md
  4. 96
      agreement/README.rst
  5. 3
      agreement/__init__.py
  6. 53
      agreement/__manifest__.py
  7. 9
      agreement/data/agreement_stage.xml
  8. 0
      agreement/data/agreement_type.xml
  9. 0
      agreement/data/ir_sequence.xml
  10. 0
      agreement/data/module_category.xml
  11. 63
      agreement/demo/demo.xml
  12. 1615
      agreement/i18n/agreement.pot
  13. 1779
      agreement/i18n/de.po
  14. 1747
      agreement/i18n/fr.po
  15. 218
      agreement/i18n/hr.po
  16. 1786
      agreement/i18n/it.po
  17. 1673
      agreement/i18n/nl.po
  18. 218
      agreement/i18n/pt_BR.po
  19. 227
      agreement/i18n/pt_PT.po
  20. 219
      agreement/i18n/zh_CN.po
  21. 22
      agreement/models/__init__.py
  22. 10
      agreement/models/account.py
  23. 434
      agreement/models/agreement.py
  24. 81
      agreement/models/agreement_appendix.py
  25. 90
      agreement/models/agreement_clause.py
  26. 7
      agreement/models/agreement_increasetype.py
  27. 22
      agreement/models/agreement_line.py
  28. 82
      agreement/models/agreement_recital.py
  29. 7
      agreement/models/agreement_renewaltype.py
  30. 81
      agreement/models/agreement_section.py
  31. 18
      agreement/models/agreement_serviceprofile.py
  32. 22
      agreement/models/agreement_stage.py
  33. 9
      agreement/models/agreement_subtype.py
  34. 8
      agreement/models/agreement_type.py
  35. 10
      agreement/models/product_template.py
  36. 30
      agreement/models/res_config_settings.py
  37. 11
      agreement/models/res_partner.py
  38. 0
      agreement/readme/CONFIGURE.rst
  39. 8
      agreement/readme/CONTRIBUTORS.rst
  40. 0
      agreement/readme/CREDITS.rst
  41. 19
      agreement/readme/DESCRIPTION.rst
  42. 0
      agreement/readme/ROADMAP.rst
  43. 7
      agreement/readme/USAGE.rst
  44. 51
      agreement/report/agreement.xml
  45. 26
      agreement/security/agreement_security.xml
  46. 26
      agreement/security/ir.model.access.csv
  47. 19
      agreement/security/res_groups.xml
  48. BIN
      agreement/static/description/icon.png
  49. 109
      agreement/static/description/index.html
  50. 469
      agreement/views/agreement.xml
  51. 20
      agreement/views/agreement_appendix.xml
  52. 19
      agreement/views/agreement_clause.xml
  53. 2
      agreement/views/agreement_increasetype.xml
  54. 25
      agreement/views/agreement_recital.xml
  55. 2
      agreement/views/agreement_renewaltype.xml
  56. 19
      agreement/views/agreement_section.xml
  57. 62
      agreement/views/agreement_serviceprofile.xml
  58. 4
      agreement/views/agreement_stages.xml
  59. 2
      agreement/views/agreement_subtype.xml
  60. 37
      agreement/views/agreement_type.xml
  61. 35
      agreement/views/menu.xml
  62. 28
      agreement/views/res_config_settings.xml
  63. 2
      agreement/views/res_partner.xml
  64. 142
      agreement_legal/README.rst
  65. 12
      agreement_legal/__init__.py
  66. 51
      agreement_legal/__manifest__.py
  67. 40
      agreement_legal/demo/demo.xml
  68. 1697
      agreement_legal/i18n/agreement_legal.pot
  69. 1983
      agreement_legal/i18n/fr.po
  70. 1710
      agreement_legal/i18n/pt_BR.po
  71. 1730
      agreement_legal/i18n/pt_PT.po
  72. 1740
      agreement_legal/i18n/zh_CN.po
  73. 18
      agreement_legal/models/__init__.py
  74. 371
      agreement_legal/models/agreement.py
  75. 73
      agreement_legal/models/agreement_appendix.py
  76. 71
      agreement_legal/models/agreement_clause.py
  77. 30
      agreement_legal/models/agreement_line.py
  78. 63
      agreement_legal/models/agreement_recital.py
  79. 63
      agreement_legal/models/agreement_section.py
  80. 12
      agreement_legal/models/agreement_status.py
  81. 15
      agreement_legal/models/agreement_type.py
  82. 12
      agreement_legal/models/product_template.py
  83. 38
      agreement_legal/models/res_config_settings.py
  84. 13
      agreement_legal/models/res_partner.py
  85. 6
      agreement_legal/readme/CONTRIBUTORS.rst
  86. 9
      agreement_legal/readme/DESCRIPTION.rst
  87. 13
      agreement_legal/readme/USAGE.rst
  88. 29
      agreement_legal/security/ir.model.access.csv
  89. 30
      agreement_legal/security/res_groups.xml
  90. BIN
      agreement_legal/static/description/icon.png
  91. 481
      agreement_legal/static/description/index.html
  92. 80
      agreement_legal/static/src/js/domain_widget_ext.js
  93. 179
      agreement_legal/static/src/xml/domain_widget_view.xml
  94. 372
      agreement_legal/views/agreement.xml
  95. 40
      agreement_legal/views/agreement_type.xml
  96. 131
      agreement_legal_sale/README.rst
  97. 3
      agreement_legal_sale/__init__.py
  98. 26
      agreement_legal_sale/__manifest__.py
  99. 55
      agreement_legal_sale/i18n/agreement_legal_sale.pot
  100. 76
      agreement_legal_sale/i18n/de.po

1
.gitignore

@ -21,7 +21,6 @@ var/
*.egg-info/
.installed.cfg
*.egg
*.eggs
# Installer logs
pip-log.txt

16
.travis.yml

@ -8,18 +8,32 @@ python:
addons:
postgresql: "9.6"
apt:
# only add the two lines below if you need wkhtmltopdf for your tests
# sources:
# - pov-wkhtmltopdf
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow
- python-simplejson
- python-serial
- python-yaml
# - wkhtmltopdf # only add if needed and check the before_install section below
# set up an X server to run wkhtmltopdf.
#before_install:
# - "export DISPLAY=:911.0"
# - "sh -e /etc/init.d/xvfb start"
env:
global:
- VERSION="12.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"
- VERSION="11.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"
matrix:
- LINT_CHECK="1"
- TESTS="1" ODOO_REPO="OCA/OCB"
- TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1"
install:
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}

10
README.md

@ -1,18 +1,18 @@
[![Runbot Status](https://runbot.odoo-community.org/runbot/badge/flat/110/12.0.svg)](https://runbot.odoo-community.org/runbot/repo/github-com-oca-contract-110)
[![Build Status](https://travis-ci.org/OCA/contract.svg?branch=12.0)](https://travis-ci.org/OCA/contract)
[![Coverage Status](https://coveralls.io/repos/OCA/contract/badge.svg?branch=12.0)](https://coveralls.io/r/OCA/contract?branch=12.0)
[![Runbot Status](https://runbot.odoo-community.org/runbot/badge/flat/110/11.0.svg)](https://runbot.odoo-community.org/runbot/repo/github-com-oca-contract-110)
[![Build Status](https://travis-ci.org/OCA/contract.svg?branch=11.0)](https://travis-ci.org/OCA/contract)
[![Coverage Status](https://coveralls.io/repos/OCA/contract/badge.svg?branch=11.0)](https://coveralls.io/r/OCA/contract?branch=11.0)
# Contracts
Odoo Contracts are special types of Analytic Accounts.
This repository provides features extending Contracts.
Dependencies on Project features should not be required.
Dependencies on Project fetures should not be required.
For Project related extensions please see the
[OCA/Project](https://github.com/OCA/project) repository.
## Translation Status
[![Translation Status](https://translation.odoo-community.org/widgets/contract-12-0/-/multi-auto.svg)](https://translation.odoo-community.org/engage/contract-12-0/?utm_source=widget)
[![Transifex Status](https://www.transifex.com/projects/p/OCA-contract-11-0/chart/image_png)](https://www.transifex.com/projects/p/OCA-contract-11-0)

96
agreement/README.rst

@ -1,6 +1,6 @@
=========
Agreement
=========
==========
Agreements
==========
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
@ -14,44 +14,67 @@ Agreement
: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
:target: https://github.com/OCA/contract/tree/11.0/agreement
: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
:target: https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement
: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
:target: https://runbot.odoo-community.org/runbot/110/11.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
This module adds an *Agreement* object with the following properties:
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.
* code,
* name,
* link to a partner,
* signature date.
* start date.
* end date.
Based on the template, an agreement can be created and the pdf document generated.
Optionally, you can also enable using:
* agreement types
* a flag to set an agreement as a template agreement
(Install agreement_sale to get the configuration settings for these).
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 > Agrements
* 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
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%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/contract/issues/new?body=module:%20agreement%0Aversion:%2011.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.
@ -61,15 +84,25 @@ Credits
Authors
~~~~~~~
* Akretion
* Yves Goldberg (Ygol Internetwork)
* Pavlov Media
* Open Source Integrators
Contributors
~~~~~~~~~~~~
* Alexis de Lattre <alexis.delattre@akretion.com>
* Yves Goldberg <yves@ygol.com>
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
* Patrick Wilson <pwilson@pavlovmedia.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Wolfgang Hall <whall@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>
Other credits
~~~~~~~~~~~~~
The development of this module has been financially supported by:
* Pavlov Media
* Open Source Integrators
Maintainers
~~~~~~~~~~~
@ -84,17 +117,14 @@ 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
.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px
:target: https://github.com/max3903
:alt: max3903
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-ygol| |maintainer-alexis-via|
|maintainer-max3903|
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/12.0/agreement>`_ project on GitHub.
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/11.0/agreement>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

3
agreement/__init__.py

@ -1 +1,4 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models

53
agreement/__manifest__.py

@ -1,28 +1,47 @@
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Agreement',
'summary': "Adds an agreement object",
'version': '12.0.1.0.0',
'category': 'Contract',
'author': 'Akretion, '
'Yves Goldberg (Ygol Internetwork), '
'name': 'Agreements',
'summary': 'Manage Agreements, LOI and Contracts',
'author': 'Pavlov Media, '
'Open Source Integrators, '
'Odoo Community Association (OCA)',
'website': 'https://github.com/oca/contract',
'website': 'https://github.com/OCA/contract',
'category': 'Partner',
'license': 'AGPL-3',
'depends': ['base'],
'version': '11.0.0.1.0',
'depends': [
'account',
'contacts',
'mail',
'product',
'sale_management',
],
'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',
'security/agreement_security.xml',
'report/agreement.xml',
'views/res_config_settings.xml',
'views/agreement.xml',
'views/agreement_appendix.xml',
'views/agreement_clause.xml',
'views/agreement_recital.xml',
'views/agreement_section.xml',
'views/agreement_serviceprofile.xml',
'views/agreement_stages.xml',
'views/agreement_type.xml',
],
'demo': ['demo/demo.xml'],
'development_status': 'Beta',
'maintainers': [
'ygol',
'alexis-via',
'views/agreement_subtype.xml',
'views/agreement_renewaltype.xml',
'views/agreement_increasetype.xml',
'views/res_partner.xml',
'views/menu.xml',
],
'installable': True,
'application': True,
'development_status': 'Beta',
'maintainers': ['max3903'],
}

9
agreement_legal/data/agreement_stage.xml → agreement/data/agreement_stage.xml

@ -4,55 +4,46 @@
<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>

0
agreement_legal/data/agreement_type.xml → agreement/data/agreement_type.xml

0
agreement_legal/data/ir_sequence.xml → agreement/data/ir_sequence.xml

0
agreement_legal/data/module_category.xml → agreement/data/module_category.xml

63
agreement/demo/demo.xml

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="market1" model="agreement">
<field name="code">C2C-IT0042</field>
<field name="name">Hardware IT</field>
<field name="partner_id" ref="base.res_partner_12"/>
<field name="signature_date">2017-09-10</field>
<field name="start_date">2017-09-10</field>
<field name="end_date">2018-09-10</field>
</record>
<record id="market2" model="agreement">
<field name="code">C2C-IT0043</field>
<field name="name">Fiber access office Lausanne</field>
<field name="partner_id" ref="base.res_partner_12"/>
<field name="signature_date" eval="time.strftime('%Y-01-01')"/>
<field name="start_date" eval="time.strftime('%Y-01-01')"/>
<field name="end_date" eval="time.strftime('%Y-01-01')"/>
</record>
<record id="market3" model="agreement">
<field name="code">AGR-VETO001</field>
<field name="name">Vétérinaire</field>
<field name="partner_id" ref="base.res_partner_2"/>
<field name="signature_date">2017-08-01</field>
<field name="start_date">2017-08-01</field>
<field name="end_date">2018-08-01</field>
</record>
<record id="market4" model="agreement">
<field name="code">AGR-TEL001</field>
<field name="name">Wazo IPBX deployment and maintenance</field>
<field name="partner_id" ref="base.res_partner_2"/>
<field name="signature_date">2017-05-05</field>
<field name="start_date">2017-05-05</field>
<field name="end_date">2018-09-10</field>
</record>
<record id="market5" model="agreement">
<field name="code">BUY-VOIP012</field>
<field name="name">SIP Phones supply</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="signature_date" eval="time.strftime('%Y-01-01')"/>
<field name="start_date" eval="time.strftime('%Y-01-01')"/>
<field name="end_date" eval="time.strftime('%Y-01-01')"/>
</record>
<record id="market6" model="agreement">
<field name="code">BUY-VOIP013</field>
<field name="name">SIP-ISDN gateways</field>
<field name="partner_id" ref="base.res_partner_3"/>
<field name="signature_date">2017-09-02</field>
</record>
</odoo>

1615
agreement/i18n/agreement.pot
File diff suppressed because it is too large
View File

1779
agreement/i18n/de.po
File diff suppressed because it is too large
View File

1747
agreement/i18n/fr.po
File diff suppressed because it is too large
View File

218
agreement/i18n/hr.po

@ -1,218 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * agreement
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-11-12 16:34+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>\n"
"Language-Team: none\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.8\n"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__active
#: model:ir.model.fields,field_description:agreement.field_agreement_type__active
msgid "Active"
msgstr "Aktivan"
#. module: agreement
#: model:ir.model,name:agreement.model_agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_form
msgid "Agreement"
msgstr "Sporazum"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__agreement_type_id
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_form_view
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_search
msgid "Agreement Type"
msgstr "Tip sporazuma"
#. module: agreement
#: model:ir.actions.act_window,name:agreement.agreement_type_action
#: model:ir.model,name:agreement.model_agreement_type
#: model:ir.ui.menu,name:agreement.agreement_type_menu
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_list_view
msgid "Agreement Types"
msgstr "Tipovi sporazuma"
#. module: agreement
#: model:ir.actions.act_window,name:agreement.agreement_action
#: model:ir.ui.menu,name:agreement.agreement_menu
#: model_terms:ir.ui.view,arch_db:agreement.agreement_tree
msgid "Agreements"
msgstr "Sporazumi"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_search
msgid "Archived"
msgstr "Arhivirano"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__company_id
msgid "Company"
msgstr "Tvrtka"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_form
msgid "Configuration"
msgstr "Postavke"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__create_uid
#: model:ir.model.fields,field_description:agreement.field_agreement_type__create_uid
msgid "Created by"
msgstr "Kreirao"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__create_date
#: model:ir.model.fields,field_description:agreement.field_agreement_type__create_date
msgid "Created on"
msgstr "Kreirano"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__display_name
#: model:ir.model.fields,field_description:agreement.field_agreement_type__display_name
msgid "Display Name"
msgstr "Naziv"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__end_date
msgid "End Date"
msgstr "Završni datum"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__id
#: model:ir.model.fields,field_description:agreement.field_agreement_type__id
msgid "ID"
msgstr "ID"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__code
msgid "ID used for internal contract tracking."
msgstr "ID za interno praćenje sporazuma"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__active
msgid "If unchecked, it will allow you to hide the agreement without removing it."
msgstr "Ako nije označeno, omogućuje vam skrivanje porazuma bez brisanja."
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__is_template
msgid "Is a Template?"
msgstr "Je predložak?"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement____last_update
#: model:ir.model.fields,field_description:agreement.field_agreement_type____last_update
msgid "Last Modified on"
msgstr "Zadnje uređivano"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__write_uid
#: model:ir.model.fields,field_description:agreement.field_agreement_type__write_uid
msgid "Last Updated by"
msgstr "Zadnje ažurirano"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__write_date
#: model:ir.model.fields,field_description:agreement.field_agreement_type__write_date
msgid "Last Updated on"
msgstr "Zadnje ažuriranje"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement_type__name
msgid "Name"
msgstr "Naziv"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Name or Number"
msgstr "Naziv ili broj"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__partner_id
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
#, fuzzy
msgid "Partner"
msgstr "Partner"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__code
msgid "Reference"
msgstr "Referenca"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Search Agreements"
msgstr "Pretraži sporazume"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__agreement_type_id
msgid "Select the type of agreement"
msgstr "Odaberi tip sporazuma"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__is_template
msgid "Set if the agreement is a template. Template agreements don't require a partner."
msgstr ""
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__signature_date
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Signature Date"
msgstr ""
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__start_date
msgid "Start Date"
msgstr ""
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__partner_id
msgid "The customer or vendor this agreement is related to."
msgstr ""
#. module: agreement
#: sql_constraint:agreement:0
msgid "This agreement code already exists for this partner!"
msgstr ""
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__name
msgid "Title"
msgstr ""
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_list_view
msgid "Type Name"
msgstr ""
#. module: agreement
#: model:res.groups,name:agreement.group_use_agreement_template
msgid "Use agreement template"
msgstr ""
#. module: agreement
#: model:res.groups,name:agreement.group_use_agreement_type
msgid "Use agreement type"
msgstr ""
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__end_date
msgid "When the agreement ends."
msgstr ""
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__start_date
msgid "When the agreement starts."
msgstr ""

1786
agreement/i18n/it.po
File diff suppressed because it is too large
View File

1673
agreement/i18n/nl.po
File diff suppressed because it is too large
View File

218
agreement/i18n/pt_BR.po

@ -1,218 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * agreement
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-12-16 15:05+0000\n"
"Last-Translator: Augusto D. Lisbôa <augusto.diniz.l@gmail.com>\n"
"Language-Team: none\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.9.1\n"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__active
#: model:ir.model.fields,field_description:agreement.field_agreement_type__active
msgid "Active"
msgstr "Ativo"
#. module: agreement
#: model:ir.model,name:agreement.model_agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_form
msgid "Agreement"
msgstr "Acordo"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__agreement_type_id
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_form_view
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_search
msgid "Agreement Type"
msgstr "Tipo de acordo"
#. module: agreement
#: model:ir.actions.act_window,name:agreement.agreement_type_action
#: model:ir.model,name:agreement.model_agreement_type
#: model:ir.ui.menu,name:agreement.agreement_type_menu
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_list_view
msgid "Agreement Types"
msgstr "Tipos de acordos"
#. module: agreement
#: model:ir.actions.act_window,name:agreement.agreement_action
#: model:ir.ui.menu,name:agreement.agreement_menu
#: model_terms:ir.ui.view,arch_db:agreement.agreement_tree
msgid "Agreements"
msgstr "Acordo"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_search
msgid "Archived"
msgstr "Arquivado"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__company_id
msgid "Company"
msgstr "Compania"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_form
msgid "Configuration"
msgstr "Configuração"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__create_uid
#: model:ir.model.fields,field_description:agreement.field_agreement_type__create_uid
msgid "Created by"
msgstr "Criado por"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__create_date
#: model:ir.model.fields,field_description:agreement.field_agreement_type__create_date
msgid "Created on"
msgstr "Criado em"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__display_name
#: model:ir.model.fields,field_description:agreement.field_agreement_type__display_name
msgid "Display Name"
msgstr "Nome exibido"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__end_date
msgid "End Date"
msgstr "Data final"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__id
#: model:ir.model.fields,field_description:agreement.field_agreement_type__id
msgid "ID"
msgstr "ID"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__code
msgid "ID used for internal contract tracking."
msgstr "ID interno para rastreamento de contrato."
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__active
msgid "If unchecked, it will allow you to hide the agreement without removing it."
msgstr "Se desmarcada, permitirá ocultar o contrato sem removê-lo."
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__is_template
msgid "Is a Template?"
msgstr "É um modelo?"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement____last_update
#: model:ir.model.fields,field_description:agreement.field_agreement_type____last_update
msgid "Last Modified on"
msgstr "Última modificação"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__write_uid
#: model:ir.model.fields,field_description:agreement.field_agreement_type__write_uid
msgid "Last Updated by"
msgstr "Atualizado recentemente por"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__write_date
#: model:ir.model.fields,field_description:agreement.field_agreement_type__write_date
msgid "Last Updated on"
msgstr "Última atualização em"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement_type__name
msgid "Name"
msgstr "Nome"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Name or Number"
msgstr "Nome ou número"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__partner_id
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Partner"
msgstr "Parceiro"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__code
msgid "Reference"
msgstr "Referência"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Search Agreements"
msgstr "Buscar acordos"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__agreement_type_id
msgid "Select the type of agreement"
msgstr "Selecione o tipo do contrato"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__is_template
msgid "Set if the agreement is a template. Template agreements don't require a partner."
msgstr ""
"Defina se o contrato é um modelo. Os contratos de modelo não exigem um "
"parceiro."
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__signature_date
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Signature Date"
msgstr "Data de assinatura"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__start_date
msgid "Start Date"
msgstr "Data de início"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__partner_id
msgid "The customer or vendor this agreement is related to."
msgstr "O cliente ou parceiro ao qual este acordo se refere."
#. module: agreement
#: sql_constraint:agreement:0
msgid "This agreement code already exists for this partner!"
msgstr "Este código de acordo já existe para este parceiro!"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__name
msgid "Title"
msgstr "Título"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_list_view
msgid "Type Name"
msgstr "Nome do tipo"
#. module: agreement
#: model:res.groups,name:agreement.group_use_agreement_template
msgid "Use agreement template"
msgstr "Usar modelo de acordo"
#. module: agreement
#: model:res.groups,name:agreement.group_use_agreement_type
msgid "Use agreement type"
msgstr "Usar tipo de acordo"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__end_date
msgid "When the agreement ends."
msgstr "Final do acordo."
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__start_date
msgid "When the agreement starts."
msgstr "Início do acordo."

227
agreement/i18n/pt_PT.po

@ -1,227 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * agreement
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-05-04 21:02+0000\n"
"Last-Translator: JC <rdc02271@yahoo.com>\n"
"Language-Team: none\n"
"Language: pt_PT\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.5.1\n"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__active
#: model:ir.model.fields,field_description:agreement.field_agreement_type__active
msgid "Active"
msgstr "Activo"
#. module: agreement
#: model:ir.model,name:agreement.model_agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_form
msgid "Agreement"
msgstr "Contrato"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__agreement_type_id
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_form_view
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_search
#, fuzzy
#| msgid "Agreement"
msgid "Agreement Type"
msgstr "Contrato"
#. module: agreement
#: model:ir.actions.act_window,name:agreement.agreement_type_action
#: model:ir.model,name:agreement.model_agreement_type
#: model:ir.ui.menu,name:agreement.agreement_type_menu
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_list_view
#, fuzzy
#| msgid "Agreements"
msgid "Agreement Types"
msgstr "Contratos"
#. module: agreement
#: model:ir.actions.act_window,name:agreement.agreement_action
#: model:ir.ui.menu,name:agreement.agreement_menu
#: model_terms:ir.ui.view,arch_db:agreement.agreement_tree
msgid "Agreements"
msgstr "Contratos"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_search
msgid "Archived"
msgstr "Arquivado"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__company_id
msgid "Company"
msgstr "Empresa"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_form
msgid "Configuration"
msgstr "Configuração"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__create_uid
#: model:ir.model.fields,field_description:agreement.field_agreement_type__create_uid
msgid "Created by"
msgstr "Criado por"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__create_date
#: model:ir.model.fields,field_description:agreement.field_agreement_type__create_date
msgid "Created on"
msgstr "Criado em"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__display_name
#: model:ir.model.fields,field_description:agreement.field_agreement_type__display_name
msgid "Display Name"
msgstr "Nome"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__end_date
msgid "End Date"
msgstr "Fim de Contrato"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__id
#: model:ir.model.fields,field_description:agreement.field_agreement_type__id
msgid "ID"
msgstr "Código"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__code
msgid "ID used for internal contract tracking."
msgstr "Código usado internamente para acompanhamento do contrato."
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__active
msgid ""
"If unchecked, it will allow you to hide the agreement without removing it."
msgstr "Desmarcar se quiser esconder o contrato mas sem o apagar."
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__is_template
msgid "Is a Template?"
msgstr ""
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement____last_update
#: model:ir.model.fields,field_description:agreement.field_agreement_type____last_update
msgid "Last Modified on"
msgstr "Modificado em"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__write_uid
#: model:ir.model.fields,field_description:agreement.field_agreement_type__write_uid
msgid "Last Updated by"
msgstr "Actualizado por"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__write_date
#: model:ir.model.fields,field_description:agreement.field_agreement_type__write_date
msgid "Last Updated on"
msgstr "Actualizado em"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement_type__name
msgid "Name"
msgstr ""
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Name or Number"
msgstr "Nome ou número"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__partner_id
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Partner"
msgstr "Parceiro"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__code
msgid "Reference"
msgstr "Referência"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Search Agreements"
msgstr "Pesquisar Contratos"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__agreement_type_id
msgid "Select the type of agreement"
msgstr ""
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__is_template
msgid ""
"Set if the agreement is a template. Template agreements don't require a "
"partner."
msgstr ""
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__signature_date
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Signature Date"
msgstr "Data da assinatura"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__start_date
msgid "Start Date"
msgstr "Data Inicial"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__partner_id
msgid "The customer or vendor this agreement is related to."
msgstr "O cliente ou fornecedor com o qual este contrato está relacionado."
#. module: agreement
#: sql_constraint:agreement:0
msgid "This agreement code already exists for this partner!"
msgstr "Este código de contrato já existe para este parceiro!"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__name
msgid "Title"
msgstr "Título"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_list_view
msgid "Type Name"
msgstr ""
#. module: agreement
#: model:res.groups,name:agreement.group_use_agreement_template
#, fuzzy
#| msgid "When the agreement starts."
msgid "Use agreement template"
msgstr "A data em que se inicia o contrato."
#. module: agreement
#: model:res.groups,name:agreement.group_use_agreement_type
#, fuzzy
#| msgid "When the agreement ends."
msgid "Use agreement type"
msgstr "A data em que termina o contrato."
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__end_date
msgid "When the agreement ends."
msgstr "A data em que termina o contrato."
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__start_date
msgid "When the agreement starts."
msgstr "A data em que se inicia o contrato."

219
agreement/i18n/zh_CN.po

@ -1,219 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * agreement
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-10-16 18:31+0000\n"
"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
"Language-Team: none\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8\n"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__active
#: model:ir.model.fields,field_description:agreement.field_agreement_type__active
msgid "Active"
msgstr "有效"
#. module: agreement
#: model:ir.model,name:agreement.model_agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_form
msgid "Agreement"
msgstr "协议"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__agreement_type_id
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_form_view
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_search
msgid "Agreement Type"
msgstr "协议类型"
#. module: agreement
#: model:ir.actions.act_window,name:agreement.agreement_type_action
#: model:ir.model,name:agreement.model_agreement_type
#: model:ir.ui.menu,name:agreement.agreement_type_menu
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_list_view
msgid "Agreement Types"
msgstr "协议类型"
#. module: agreement
#: model:ir.actions.act_window,name:agreement.agreement_action
#: model:ir.ui.menu,name:agreement.agreement_menu
#: model_terms:ir.ui.view,arch_db:agreement.agreement_tree
msgid "Agreements"
msgstr "协议"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_search
msgid "Archived"
msgstr "已归档"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__company_id
msgid "Company"
msgstr "公司"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_form
msgid "Configuration"
msgstr "配置"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__create_uid
#: model:ir.model.fields,field_description:agreement.field_agreement_type__create_uid
msgid "Created by"
msgstr "创建者"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__create_date
#: model:ir.model.fields,field_description:agreement.field_agreement_type__create_date
msgid "Created on"
msgstr "创建时间"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__display_name
#: model:ir.model.fields,field_description:agreement.field_agreement_type__display_name
msgid "Display Name"
msgstr "显示名称"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__end_date
msgid "End Date"
msgstr "结束日期"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__id
#: model:ir.model.fields,field_description:agreement.field_agreement_type__id
msgid "ID"
msgstr "ID"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__code
msgid "ID used for internal contract tracking."
msgstr "用于内部合同跟踪的ID。"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__active
msgid ""
"If unchecked, it will allow you to hide the agreement without removing it."
msgstr "如果不选中,它将允许您隐藏协议而不删除它。"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__is_template
msgid "Is a Template?"
msgstr "是模板吗?"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement____last_update
#: model:ir.model.fields,field_description:agreement.field_agreement_type____last_update
msgid "Last Modified on"
msgstr "最后修改时间"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__write_uid
#: model:ir.model.fields,field_description:agreement.field_agreement_type__write_uid
msgid "Last Updated by"
msgstr "最后更新者"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__write_date
#: model:ir.model.fields,field_description:agreement.field_agreement_type__write_date
msgid "Last Updated on"
msgstr "最后更新时间"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement_type__name
msgid "Name"
msgstr "名称"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Name or Number"
msgstr "姓名或号码"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__partner_id
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Partner"
msgstr "业务伙伴"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__code
msgid "Reference"
msgstr "参考"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Search Agreements"
msgstr "搜索协议"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__agreement_type_id
msgid "Select the type of agreement"
msgstr "选择协议类型"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__is_template
msgid ""
"Set if the agreement is a template. Template agreements don't require a "
"partner."
msgstr "如果协议是模板,则设置。模板协议不需要合作伙伴。"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__signature_date
#: model_terms:ir.ui.view,arch_db:agreement.agreement_search
msgid "Signature Date"
msgstr "签名日期"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__start_date
msgid "Start Date"
msgstr "开始日期"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__partner_id
msgid "The customer or vendor this agreement is related to."
msgstr "与本协议相关的客户或供应商。"
#. module: agreement
#: sql_constraint:agreement:0
msgid "This agreement code already exists for this partner!"
msgstr "此合作伙伴的协议代码已存在!"
#. module: agreement
#: model:ir.model.fields,field_description:agreement.field_agreement__name
msgid "Title"
msgstr "标题"
#. module: agreement
#: model_terms:ir.ui.view,arch_db:agreement.agreement_type_list_view
msgid "Type Name"
msgstr "类型名称"
#. module: agreement
#: model:res.groups,name:agreement.group_use_agreement_template
msgid "Use agreement template"
msgstr "使用协议模板"
#. module: agreement
#: model:res.groups,name:agreement.group_use_agreement_type
msgid "Use agreement type"
msgstr "使用协议类型"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__end_date
msgid "When the agreement ends."
msgstr "协议结束时。"
#. module: agreement
#: model:ir.model.fields,help:agreement.field_agreement__start_date
msgid "When the agreement starts."
msgstr "协议开始时。"

22
agreement/models/__init__.py

@ -1,2 +1,20 @@
from . import agreement
from . import agreement_type
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import (
res_config_settings,
account,
agreement,
agreement_appendix,
agreement_clause,
agreement_line,
agreement_recital,
agreement_section,
agreement_serviceprofile,
agreement_stage,
agreement_type,
agreement_subtype,
res_partner,
product_template,
agreement_renewaltype,
agreement_increasetype,
)

10
agreement/models/account.py

@ -0,0 +1,10 @@
# Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountAnalyticLine(models.Model):
_inherit = 'account.analytic.line'
agreement_id = fields.Many2one('agreement', string='Agreement')

434
agreement/models/agreement.py

@ -1,50 +1,414 @@
# © 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
from odoo import api, fields, models, _
class Agreement(models.Model):
_name = 'agreement'
_description = 'Agreement'
_inherit = ['mail.thread']
code = fields.Char(required=True, copy=False)
name = fields.Char(required=True)
partner_id = fields.Many2one(
'res.partner', string='Partner', ondelete='restrict',
domain=[('parent_id', '=', False)])
company_id = fields.Many2one(
'res.company', string='Company',
default=lambda self: self.env['res.company']._company_default_get())
def _default_stage_id(self):
return self.env.ref('agreement.agreement_stage_new')
# General
name = fields.Char(string="Title", required=True)
is_template = fields.Boolean(
string="Is a Template?",
default=False,
copy=False,
help="Set if the agreement is a template. "
"Template agreements don't require a partner."
)
help="Make this agreement a template.")
version = fields.Integer(
string="Version",
default=1,
copy=False,
help="The versions are used to keep track of document history and "
"previous versions can be referenced.")
revision = fields.Integer(
string="Revision",
default=0,
copy=False,
help="The revision will increase with every save event.")
description = fields.Text(
string="Description",
track_visibility='onchange',
help="Description of the agreement")
dynamic_description = fields.Text(
compute="_compute_dynamic_description",
string="Dynamic Description",
help='Compute dynamic description')
start_date = fields.Date(
string="Start Date",
track_visibility='onchange',
help="When the agreement starts.")
end_date = fields.Date(
string="End Date",
track_visibility='onchange',
help="When the agreement ends.")
color = fields.Integer()
active = fields.Boolean(
string="Active",
default=True,
help="If unchecked, it will allow you to hide the agreement without "
"removing it.")
company_signed_date = fields.Date(
string="Signed on",
track_visibility='onchange',
help="Date the contract was signed by Company.")
partner_signed_date = fields.Date(
string="Signed on",
track_visibility='onchange',
help="Date the contract was signed by the Partner.")
term = fields.Integer(
string="Term (Months)",
track_visibility='onchange',
help="Number of months this agreement/contract is in effect with the "
"partner.")
expiration_notice = fields.Integer(
string="Exp. Notice (Days)",
track_visibility='onchange',
help="Number of Days before expiration to be notified.")
change_notice = fields.Integer(
string="Change Notice (Days)",
track_visibility='onchange',
help="Number of Days to be notified before changes.")
special_terms = fields.Text(
string="Special Terms",
track_visibility='onchange',
help="Any terms that you have agreed to and want to track on the "
"agreement/contract.")
dynamic_special_terms = fields.Text(
compute="_compute_dynamic_special_terms",
string="Dynamic Special Terms",
help='Compute dynamic special terms')
contract_value = fields.Monetary(
compute='_compute_contract_value',
string="Contract Value",
help="Total value of the contract over ther entire term.",
store=True)
reference = fields.Char(
string="Reference",
copy=False,
required=True,
default=lambda self: _('New'),
track_visibility='onchange',
help="ID used for internal contract tracking.")
total_company_mrc = fields.Monetary(
'Company MRC',
currency_field='currency_id',
help="Total company monthly recurring costs.")
total_customer_mrc = fields.Monetary(
'Customer MRC',
currency_field='currency_id',
help="Total custemer monthly recurring costs.")
total_company_nrc = fields.Monetary(
'Company NRC',
currency_field='currency_id',
help="Total company non-recurring costs.")
total_customer_nrc = fields.Monetary(
'Customer NRC',
currency_field='currency_id',
help="Total custemer non-monthly recurring costs.")
increase_type_id = fields.Many2one(
'agreement.increasetype',
string="Increase Type",
track_visibility='onchange',
help="The amount that certain rates may increase.")
termination_requested = fields.Date(
string="Termination Requested Date",
track_visibility='onchange',
help="Date that a request for termination was received.")
termination_date = fields.Date(
string="Termination Date",
track_visibility='onchange',
help="Date that the contract was terminated.")
reviewed_date = fields.Date(
string="Reviewed Date",
track_visibility='onchange')
reviewed_user_id = fields.Many2one(
'res.users',
string="Reviewed By",
track_visibility='onchange')
approved_date = fields.Date(
string="Approved Date",
track_visibility='onchange')
approved_user_id = fields.Many2one(
'res.users',
string="Approved By",
track_visibility='onchange')
currency_id = fields.Many2one(
'res.currency',
string='Currency')
partner_id = fields.Many2one(
'res.partner',
string="Partner",
copy=True,
help="The customer or vendor this agreement is related to.")
company_partner_id = fields.Many2one(
'res.partner',
string="Company",
copy=True,
default=lambda self: self.env.user.company_id.partner_id)
partner_contact_id = fields.Many2one(
'res.partner',
string="Partner Contact",
copy=True,
help="The primary partner contact (If Applicable).")
partner_contact_phone = fields.Char(
related='partner_contact_id.phone',
string="Phone")
partner_contact_email = fields.Char(
related='partner_contact_id.email',
string="Email")
company_contact_id = fields.Many2one(
'res.partner',
string="Company Contact",
copy=True,
help="The primary contact in the company.")
company_contact_phone = fields.Char(
related='company_contact_id.phone',
string="Phone")
company_contact_email = fields.Char(
related='company_contact_id.email',
string="Email")
agreement_type_id = fields.Many2one(
'agreement.type',
string="Agreement Type",
help="Select the type of agreement",
track_visibility='onchange',
help="Select the type of agreement.")
agreement_subtype_id = fields.Many2one(
'agreement.subtype',
string="Agreement Sub-type",
track_visibility='onchange',
help="Select the sub-type of this agreement. Sub-Types are related to "
"agreement types.")
product_ids = fields.Many2many(
'product.template',
string="Products & Services")
sale_order_id = fields.Many2one(
'sale.order',
string="Sales Order",
track_visibility='onchange',
copy=False,
help="Select the Sales Order that this agreement is related to.")
payment_term_id = fields.Many2one(
'account.payment.term',
string="Payment Term",
track_visibility='onchange',
help="Terms of payments.")
assigned_user_id = fields.Many2one(
'res.users',
string="Assigned To",
track_visibility='onchange',
help="Select the user who manages this agreement.")
company_signed_user_id = fields.Many2one(
'res.users',
string="Signed By",
track_visibility='onchange',
help="The user at our company who authorized/signed the agreement or "
"contract.")
partner_signed_user_id = fields.Many2one(
'res.partner',
string="Signed By",
track_visibility='onchange',
help="Contact on the account that signed the agreement/contract.")
parent_agreement_id = fields.Many2one(
'agreement',
string="Parent Agreement",
help="Link this agreement to a parent agreement. For example if this "
"agreement is an amendment to another agreement. This list will "
"only show other agreements related to the same account.")
renewal_type_id = fields.Many2one(
'agreement.renewaltype',
string="Renewal Type",
track_visibility='onchange',
help="Describes what happens after the contract expires.")
order_lines_services_ids = fields.One2many(
related='sale_order_id.order_line',
string="Service Order Lines",
copy=False)
recital_ids = fields.One2many('agreement.recital', 'agreement_id',
string="Recitals", copy=True)
sections_ids = fields.One2many('agreement.section', 'agreement_id',
string="Sections", copy=True)
clauses_ids = fields.One2many('agreement.clause', 'agreement_id',
string="Clauses", copy=True)
appendix_ids = fields.One2many('agreement.appendix', 'agreement_id',
string="Appendices", copy=True)
serviceprofile_ids = fields.One2many('agreement.serviceprofile',
'agreement_id',
string="Service Profiles")
analytic_id = fields.Many2one('account.analytic.account',
string='Analytic Account', index=True)
analytic_line_ids = fields.One2many('account.analytic.line',
'agreement_id',
string='Revenues and Costs',
copy=False)
previous_version_agreements_ids = fields.One2many(
'agreement',
'parent_agreement_id',
string="Child Agreements",
copy=False,
domain=[('active', '=', False)])
child_agreements_ids = fields.One2many(
'agreement',
'parent_agreement_id',
string="Child Agreements",
copy=False,
domain=[('active', '=', True)])
line_ids = fields.One2many('agreement.line', 'agreement_id',
string="Products/Services", copy=False)
state = fields.Selection([
('draft', 'Draft'),
('active', 'Active'),
('inactive', 'Inactive')],
default='draft',
track_visibility='always')
notification_address_id = fields.Many2one(
'res.partner',
string="Notification Address",
help="The address to send notificaitons to, if different from "
"customer address.(Address Type = Other)")
signed_contract_filename = fields.Char(
string="Filename")
signed_contract = fields.Binary(
string="Signed Document",
track_visibility='always')
field_id = fields.Many2one(
'ir.model.fields', string="Field",
help="""Select target field from the related document model. If it is a
relationship field you will be able to select a target field at the
destination of the relationship.""")
sub_object_id = fields.Many2one(
'ir.model', string="Sub-model",
help="""When a relationship field is selected as first field, this
field shows the document model the relationship goes to.""")
sub_model_object_field_id = fields.Many2one(
'ir.model.fields', string="Sub-field",
help="""When a relationship field is selected as first field, this
field lets you select the target field within the destination document
model (sub-model).""")
default_value = fields.Char(
string="Default Value",
help="Optional value to use if the target field is empty.")
copyvalue = fields.Char(
string="Placeholder Expression",
help="""Final placeholder expression, to be copy-pasted in the desired
template field.""")
# compute the dynamic content for mako expression
@api.multi
def _compute_dynamic_description(self):
MailTemplates = self.env['mail.template']
for agreement in self:
lang = agreement.partner_id.lang or 'en_US'
description = MailTemplates.with_context(
lang=lang).render_template(
agreement.description, 'agreement', agreement.id)
agreement.dynamic_description = description
@api.multi
def _compute_dynamic_special_terms(self):
MailTemplates = self.env['mail.template']
for agreement in self:
lang = agreement.partner_id.lang or 'en_US'
special_terms = MailTemplates.with_context(
lang=lang).render_template(
agreement.special_terms, 'agreement', agreement.id)
agreement.dynamic_special_terms = special_terms
# compute contract_value field
@api.depends('total_customer_mrc', 'total_customer_nrc', 'term')
def _compute_contract_value(self):
for record in self:
record.contract_value = \
(record.total_customer_mrc * record.term) + \
record.total_customer_nrc
# compute total_company_mrc field
@api.depends('order_lines_services_ids', 'sale_order_id')
def _compute_company_mrc(self):
order_lines = self.env['sale.order.line'].search(
[('is_service', '=', True)])
amount_total = sum(order_lines.mapped('purchase_price'))
for record in self:
record.total_company_mrc = amount_total
@api.onchange('field_id', 'sub_model_object_field_id', 'default_value')
def onchange_copyvalue(self):
self.sub_object_id = False
self.copyvalue = False
self.sub_object_id = False
if self.field_id and not self.field_id.relation:
self.copyvalue = "${object.%s or %s}" % \
(self.field_id.name,
self.default_value or '\'\'')
self.sub_model_object_field_id = False
if self.field_id and self.field_id.relation:
self.sub_object_id = self.env['ir.model'].search(
[('model', '=', self.field_id.relation)])[0]
if self.sub_model_object_field_id:
self.copyvalue = "${object.%s.%s or %s}" %\
(self.field_id.name,
self.sub_model_object_field_id.name,
self.default_value or '\'\'')
# Used for Kanban grouped_by view
@api.model
def _read_group_stage_ids(self, stages, domain, order):
stage_ids = self.env['agreement.stage'].search([])
return stage_ids
stage_id = fields.Many2one(
'agreement.stage',
string="Stage",
group_expand='_read_group_stage_ids',
help="Select the current stage of the agreement.",
track_visibility='onchange',
index=True,
default=lambda self: self._default_stage_id(),
)
active = fields.Boolean(default=True)
signature_date = fields.Date()
start_date = fields.Date()
end_date = fields.Date()
def name_get(self):
res = []
for agr in self:
name = agr.name
if agr.code:
name = '[%s] %s' % (agr.code, agr.name)
res.append((agr.id, name))
return res
_sql_constraints = [(
'code_partner_company_unique',
'unique(code, partner_id, company_id)',
'This agreement code already exists for this partner!'
)]
# Create New Version Button
@api.multi
def create_new_version(self, vals):
for rec in self:
if not rec.state == 'draft':
# Make sure status is draft
rec.state = 'draft'
default_vals = {'name': '{0} - OLD VERSION'.format(rec.name),
'active': False,
'parent_agreement_id': rec.id}
# Make a current copy and mark it as old
rec.copy(default=default_vals)
# Increment the Version
rec.version = rec.version + 1
# Reset revision to 0 since it's a new version
vals['revision'] = 0
return super(Agreement, self).write(vals)
def create_new_agreement(self):
default_vals = {'name': 'NEW',
'active': True,
'version': 1,
'revision': 0,
'state': 'draft'}
res = self.copy(default=default_vals)
return {'res_model': 'agreement',
'type': 'ir.actions.act_window',
'view_mode': 'form',
'view_type': 'form',
'res_id': res.id}
@api.model
def create(self, vals):
if vals.get('reference', _('New')) == _('New'):
vals['reference'] = \
self.env['ir.sequence'].next_by_code('agreement') or _('New')
return super(Agreement, self).create(vals)
# Increments the revision on each save action
@api.multi
def write(self, vals):
vals['revision'] = self.revision + 1
return super(Agreement, self).write(vals)

81
agreement/models/agreement_appendix.py

@ -0,0 +1,81 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AgreementAppendix(models.Model):
_name = 'agreement.appendix'
_description = 'Agreement Appendices'
_order = "sequence"
name = fields.Char(string="Name", required=True)
title = fields.Char(string="Title", required=True,
help="The title is displayed on the PDF."
"The name is not.")
sequence = fields.Integer(string="Sequence", default=10)
content = fields.Html(string="Content")
dynamic_content = fields.Html(
compute="_compute_dynamic_content",
string="Dynamic Content",
help='compute dynamic Content')
agreement_id = fields.Many2one('agreement', string="Agreement",
ondelete="cascade")
active = fields.Boolean(
string="Active", default=True,
help="If unchecked, it will allow you to hide this appendix without "
"removing it.")
# Dynamic field editor
field_id = fields.Many2one(
'ir.model.fields', string="Field",
help="""Select target field from the related document model. If it is a
relationship field you will be able to select a target field at the
destination of the relationship.""")
sub_object_id = fields.Many2one(
'ir.model', string="Sub-model",
help="""When a relationship field is selected as first field, this
field shows the document model the relationship goes to.""")
sub_model_object_field_id = fields.Many2one(
'ir.model.fields', string="Sub-field",
help="""When a relationship field is selected as first field, this
field lets you select the target field within the destination document
model (sub-model).""")
default_value = fields.Char(
string="Default Value",
help="Optional value to use if the target field is empty.")
copyvalue = fields.Char(
string="Placeholder Expression",
help="""Final placeholder expression, to be copy-pasted in the desired
template field.""")
@api.onchange('field_id', 'sub_model_object_field_id', 'default_value')
def onchange_copyvalue(self):
self.sub_object_id = False
self.copyvalue = False
self.sub_object_id = False
if self.field_id and not self.field_id.relation:
self.copyvalue = "${object.%s or %s}" % \
(self.field_id.name,
self.default_value or '\'\'')
self.sub_model_object_field_id = False
if self.field_id and self.field_id.relation:
self.sub_object_id = self.env['ir.model'].search(
[('model', '=', self.field_id.relation)])[0]
if self.sub_model_object_field_id:
self.copyvalue = "${object.%s.%s or %s}" %\
(self.field_id.name,
self.sub_model_object_field_id.name,
self.default_value or '\'\'')
# compute the dynamic content for mako expression
@api.multi
def _compute_dynamic_content(self):
MailTemplates = self.env['mail.template']
for appendix in self:
lang = appendix.agreement_id and \
appendix.agreement_id.partner_id.lang or 'en_US'
content = MailTemplates.with_context(
lang=lang).render_template(
appendix.content, 'agreement.appendix', appendix.id)
appendix.dynamic_content = content

90
agreement/models/agreement_clause.py

@ -0,0 +1,90 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AgreementClause(models.Model):
_name = 'agreement.clause'
_description = 'Agreement Clauses'
_order = 'sequence'
name = fields.Char(string="Name", required=True)
title = fields.Char(string="Title",
help="The title is displayed on the PDF."
"The name is not.")
sequence = fields.Integer(string="Sequence")
agreement_id = fields.Many2one(
'agreement',
string="Agreement",
ondelete="cascade"
)
section_id = fields.Many2one(
'agreement.section',
string="Section",
ondelete="cascade"
)
content = fields.Html(string="Clause Content")
dynamic_content = fields.Html(
compute="_compute_dynamic_content",
string="Dynamic Content",
help='compute dynamic Content')
active = fields.Boolean(
string="Active",
default=True,
help="If unchecked, it will allow you to hide the agreement without "
"removing it.")
# Dynamic field editor
field_id = fields.Many2one(
'ir.model.fields', string="Field",
help="""Select target field from the related document model. If it is a
relationship field you will be able to select a target field at the
destination of the relationship.""")
sub_object_id = fields.Many2one(
'ir.model', string="Sub-model",
help="""When a relationship field is selected as first field, this
field shows the document model the relationship goes to.""")
sub_model_object_field_id = fields.Many2one(
'ir.model.fields', string="Sub-field",
help="""When a relationship field is selected as first field, this
field lets you select the target field within the destination document
model (sub-model).""")
default_value = fields.Char(
string="Default Value",
help="Optional value to use if the target field is empty.")
copyvalue = fields.Char(
string="Placeholder Expression",
help="""Final placeholder expression, to be copy-pasted in the desired
template field.""")
@api.onchange('field_id', 'sub_model_object_field_id', 'default_value')
def onchange_copyvalue(self):
self.sub_object_id = False
self.copyvalue = False
self.sub_object_id = False
if self.field_id and not self.field_id.relation:
self.copyvalue = "${object.%s or %s}" % \
(self.field_id.name,
self.default_value or '\'\'')
self.sub_model_object_field_id = False
if self.field_id and self.field_id.relation:
self.sub_object_id = self.env['ir.model'].search(
[('model', '=', self.field_id.relation)])[0]
if self.sub_model_object_field_id:
self.copyvalue = "${object.%s.%s or %s}" %\
(self.field_id.name,
self.sub_model_object_field_id.name,
self.default_value or '\'\'')
# compute the dynamic content for mako expression
@api.multi
def _compute_dynamic_content(self):
MailTemplates = self.env['mail.template']
for clause in self:
lang = clause.agreement_id and \
clause.agreement_id.partner_id.lang or 'en_US'
content = MailTemplates.with_context(
lang=lang).render_template(
clause.content, 'agreement.clause', clause.id)
clause.dynamic_content = content

7
agreement_legal/models/agreement_increasetype.py → agreement/models/agreement_increasetype.py

@ -1,20 +1,19 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
from odoo import models, fields
# Main Agreement Increase Type Records Model
class AgreementIncreaseType(models.Model):
_name = "agreement.increasetype"
_description = "Agreement Increase Type"
_name = 'agreement.increasetype'
# General
name = fields.Char(
string="Title",
required=True,
help="Increase types describe any increases that may happen during "
"the contract.",
"the contract."
)
description = fields.Text(
string="Description",

22
agreement/models/agreement_line.py

@ -0,0 +1,22 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AgreementLine(models.Model):
_name = 'agreement.line'
_description = 'Agreement Lines'
product_id = fields.Many2one('product.product', string='Product')
name = fields.Char(string="Description", required=True)
agreement_id = fields.Many2one('agreement', string="Agreement",
ondelete="cascade")
qty = fields.Float(string='Quantity')
uom_id = fields.Many2one('product.uom', string='Unit of Measure',
required=True)
@api.onchange('product_id')
def _onchange_product_id(self):
self.name = self.product_id.name
self.uom_id = self.product_id.uom_id.id

82
agreement/models/agreement_recital.py

@ -0,0 +1,82 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AgreementRecital(models.Model):
_name = 'agreement.recital'
_description = 'Agreement Recitals'
_order = "sequence"
name = fields.Char(string="Name", required=True)
title = fields.Char(string="Title",
help="The title is displayed on the PDF."
"The name is not.")
sequence = fields.Integer(string="Sequence", default=10)
content = fields.Html(string="Content")
dynamic_content = fields.Html(
compute="_compute_dynamic_content",
string="Dynamic Content",
help='compute dynamic Content')
agreement_id = fields.Many2one('agreement', string="Agreement",
ondelete="cascade")
active = fields.Boolean(
string="Active",
default=True,
help="If unchecked, it will allow you to hide this recital without "
"removing it.")
# Dynamic field editor
field_id = fields.Many2one(
'ir.model.fields', string="Field",
help="""Select target field from the related document model. If it is a
relationship field you will be able to select a target field at the
destination of the relationship.""")
sub_object_id = fields.Many2one(
'ir.model', string="Sub-model",
help="""When a relationship field is selected as first field, this
field shows the document model the relationship goes to.""")
sub_model_object_field_id = fields.Many2one(
'ir.model.fields', string="Sub-field",
help="""When a relationship field is selected as first field, this
field lets you select the target field within the destination document
model (sub-model).""")
default_value = fields.Char(
string="Default Value",
help="Optional value to use if the target field is empty.")
copyvalue = fields.Char(
string="Placeholder Expression",
help="""Final placeholder expression, to be copy-pasted in the desired
template field.""")
@api.onchange('field_id', 'sub_model_object_field_id', 'default_value')
def onchange_copyvalue(self):
self.sub_object_id = False
self.copyvalue = False
self.sub_object_id = False
if self.field_id and not self.field_id.relation:
self.copyvalue = "${object.%s or %s}" % \
(self.field_id.name,
self.default_value or '\'\'')
self.sub_model_object_field_id = False
if self.field_id and self.field_id.relation:
self.sub_object_id = self.env['ir.model'].search(
[('model', '=', self.field_id.relation)])[0]
if self.sub_model_object_field_id:
self.copyvalue = "${object.%s.%s or %s}" %\
(self.field_id.name,
self.sub_model_object_field_id.name,
self.default_value or '\'\'')
# compute the dynamic content for mako expression
@api.multi
def _compute_dynamic_content(self):
MailTemplates = self.env['mail.template']
for recital in self:
lang = recital.agreement_id and \
recital.agreement_id.partner_id.lang or 'en_US'
content = MailTemplates.with_context(
lang=lang).render_template(
recital.content, 'agreement.recital', recital.id)
recital.dynamic_content = content

7
agreement_legal/models/agreement_renewaltype.py → agreement/models/agreement_renewaltype.py

@ -1,20 +1,19 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
from odoo import models, fields
# Main Agreement Section Records Model
class AgreementRenewalType(models.Model):
_name = "agreement.renewaltype"
_description = "Agreement Renewal Type"
_name = 'agreement.renewaltype'
# General
name = fields.Char(
string="Title",
required=True,
help="Renewal types describe what happens after the "
"agreement/contract expires.",
"agreement/contract expires."
)
description = fields.Text(
string="Description",

81
agreement/models/agreement_section.py

@ -0,0 +1,81 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AgreementSection(models.Model):
_name = 'agreement.section'
_description = 'Agreement Sections'
_order = 'sequence'
name = fields.Char(string="Name", required=True)
title = fields.Char(string="Title",
help="The title is displayed on the PDF."
"The name is not.")
sequence = fields.Integer(string="Sequence")
agreement_id = fields.Many2one('agreement', string="Agreement",
ondelete="cascade")
clauses_ids = fields.One2many('agreement.clause', 'section_id',
string="Clauses")
content = fields.Html(string="Section Content")
dynamic_content = fields.Html(compute="_compute_dynamic_content",
string="Dynamic Content",
help='compute dynamic Content')
active = fields.Boolean(string="Active", default=True,
help="""If unchecked, it will allow you to hide the
agreement without removing it.""")
# Dynamic field editor
field_id = fields.Many2one(
'ir.model.fields', string="Field",
help="""Select target field from the related document model. If it is a
relationship field you will be able to select a target field at the
destination of the relationship.""")
sub_object_id = fields.Many2one(
'ir.model', string="Sub-model",
help="""When a relationship field is selected as first field, this
field shows the document model the relationship goes to.""")
sub_model_object_field_id = fields.Many2one(
'ir.model.fields', string="Sub-field",
help="""When a relationship field is selected as first field, this
field lets you select the target field within the destination document
model (sub-model).""")
default_value = fields.Char(
string="Default Value",
help="Optional value to use if the target field is empty.")
copyvalue = fields.Char(
string="Placeholder Expression",
help="""Final placeholder expression, to be copy-pasted in the desired
template field.""")
@api.onchange('field_id', 'sub_model_object_field_id', 'default_value')
def onchange_copyvalue(self):
self.sub_object_id = False
self.copyvalue = False
self.sub_object_id = False
if self.field_id and not self.field_id.relation:
self.copyvalue = "${object.%s or %s}" % \
(self.field_id.name,
self.default_value or '\'\'')
self.sub_model_object_field_id = False
if self.field_id and self.field_id.relation:
self.sub_object_id = self.env['ir.model'].search(
[('model', '=', self.field_id.relation)])[0]
if self.sub_model_object_field_id:
self.copyvalue = "${object.%s.%s or %s}" %\
(self.field_id.name,
self.sub_model_object_field_id.name,
self.default_value or '\'\'')
# compute the dynamic content for mako expression
@api.multi
def _compute_dynamic_content(self):
MailTemplates = self.env['mail.template']
for section in self:
lang = section.agreement_id and \
section.agreement_id.partner_id.lang or 'en_US'
content = MailTemplates.with_context(
lang=lang).render_template(
section.content, 'agreement.section', section.id)
section.dynamic_content = content

18
agreement/models/agreement_serviceprofile.py

@ -0,0 +1,18 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AgreementServiceProfile(models.Model):
_name = 'agreement.serviceprofile'
_description = 'Agreement Service Profiles'
name = fields.Char(string="Name", required=True)
agreement_id = fields.Many2one('agreement', string="Agreement",
ondelete="cascade")
active = fields.Boolean(
string="Active",
default=True,
help="If unchecked, it will allow you to hide this service profile"
" without removing it.")

22
agreement_legal/models/agreement_stage.py → agreement/models/agreement_stage.py

@ -1,31 +1,31 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
from odoo import models, fields
# Main Agreement Section Records Model
class AgreementStage(models.Model):
_name = "agreement.stage"
_description = "Agreement Stages"
_order = "sequence"
_name = 'agreement.stage'
_description = 'Agreement Stages'
_order = 'sequence'
# General
name = fields.Char(
string="Stage Name",
required=True)
required=True
)
description = fields.Text(
string="Description",
required=False)
required=False
)
sequence = fields.Integer(
string="Sequence",
default="1",
required=False)
required=False
)
fold = fields.Boolean(
string="Is Folded",
required=False,
help="This stage is folded in the kanban view by default.",
help="This stage is folded in the kanban view by deafault."
)
stage_type = fields.Selection(
[('agreement', 'Agreement')],
string='Type', required=True)

9
agreement_legal/models/agreement_subtype.py → agreement/models/agreement_subtype.py

@ -5,10 +5,9 @@ from odoo import fields, models
class AgreementSubtype(models.Model):
_name = "agreement.subtype"
_description = "Agreement Subtypes"
_name = 'agreement.subtype'
_description = 'Agreement Subtypes'
name = fields.Char(string="Name", required=True)
agreement_type_id = fields.Many2one(
"agreement.type",
string="Agreement Type")
agreement_type_id = fields.Many2one('agreement.type',
string="Agreement Type")

8
agreement/models/agreement_type.py

@ -5,8 +5,10 @@ from odoo import fields, models
class AgreementType(models.Model):
_name = "agreement.type"
_description = "Agreement Types"
_name = 'agreement.type'
_description = 'Agreement Types'
name = fields.Char(string="Name", required=True)
active = fields.Boolean(default=True)
agreement_subtypes_ids = fields.One2many('agreement.subtype',
'agreement_type_id',
string="Subtypes")

10
agreement/models/product_template.py

@ -0,0 +1,10 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
class Product(models.Model):
_inherit = 'product.template'
agreements_ids = fields.Many2many('agreement', string="Agreements")

30
agreement/models/res_config_settings.py

@ -0,0 +1,30 @@
# Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
module_agreement_maintenance = fields.Boolean(
string='Manage maintenance agreements and contracts.')
module_agreement_mrp = fields.Boolean(
string='Link your manufacturing orders to an agreement.')
module_agreement_project = fields.Boolean(
string='Link your projects and tasks to an agreement.')
module_agreement_repair = fields.Boolean(
string='Link your repair orders to an agreement.')
module_agreement_rma = fields.Boolean(
string='Link your RMAs to an agreement.')
module_agreement_sale = fields.Boolean(
string='Create an agreement when the sale order is confirmed.')
module_agreement_sale_subscription = fields.Boolean(
string='Link your subscriptions to an agreement.')
module_agreement_stock = fields.Boolean(
string='Link your pickings to an agreement.')
module_fieldservice_agreement = fields.Boolean(
string='Link your Field Service orders and equipments to an'
' agreement.')
module_helpdesk_agreement = fields.Boolean(
string='Link your Helpdesk tickets to an agreement.')

11
agreement/models/res_partner.py

@ -0,0 +1,11 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
class Partner(models.Model):
_inherit = 'res.partner'
agreement_ids = fields.One2many('agreement', 'partner_id',
string="Agreements")

0
agreement_legal/readme/CONFIGURE.rst → agreement/readme/CONFIGURE.rst

8
agreement/readme/CONTRIBUTORS.rst

@ -1,3 +1,5 @@
* Alexis de Lattre <alexis.delattre@akretion.com>
* Yves Goldberg <yves@ygol.com>
* Alexandre Fayolle <alexandre.fayolle@camptocamp.com>
* Patrick Wilson <pwilson@pavlovmedia.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Wolfgang Hall <whall@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>

0
agreement_legal_sale/readme/CREDITS.rst → agreement/readme/CREDITS.rst

19
agreement/readme/DESCRIPTION.rst

@ -1,14 +1,9 @@
This module adds an *Agreement* object with the following properties:
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.
* code,
* name,
* link to a partner,
* signature date.
* start date.
* end date.
Based on the template, an agreement can be created and the pdf document generated.
Optionally, you can also enable using:
* agreement types
* a flag to set an agreement as a template agreement
(Install agreement_sale to get the configuration settings for these).
The agreement would go through a workflow to finally become a contract with the
customer signature.

0
agreement_legal/readme/ROADMAP.rst → agreement/readme/ROADMAP.rst

7
agreement/readme/USAGE.rst

@ -0,0 +1,7 @@
To use this module:
* Go to Agreement > Agrements
* 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

51
agreement_legal/report/agreement.xml → agreement/report/agreement.xml

@ -5,16 +5,16 @@
id="partner_agreement_contract_document"
model="agreement"
string="Contract Document"
name="agreement_legal.report_agreement_document"
file="agreement_legal.report_agreement_document"
name="agreement.report_agreement_document"
file="agreement.report_agreement_document"
report_type="qweb-pdf"/>
<report
id="partner_agreement_contract_document_preview"
model="agreement"
string="Contract Document Preview"
name="agreement_legal.report_agreement_document"
file="agreement_legal.report_agreement_document"
name="agreement.report_agreement_document"
file="agreement.report_agreement_document"
report_type="qweb-html"/>
<template id="report_agreement_document">
@ -25,32 +25,25 @@
<div class="page">
<h1 t-field="doc.name"/>
<div name="description">
<span t-field="doc.dynamic_description"/>
<p t-field="doc.dynamic_description"/>
</div>
<h2>Parties</h2>
<div name="parties">
<t t-if="doc.use_parties_content">
<p t-field="doc.dynamic_parties"/>
</t>
<h3>Company Information</h3>
<div name="company_address">
<address t-field="doc.company_partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
</div>
<div name="company_contact">
Represented by <span t-field="doc.company_contact_id.name"/>.
</div>
<h3>Partner Information</h3>
<div name="partner_address">
<address t-field="doc.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
</div>
<div name="partner_contact">
Represented by <span t-field="doc.partner_contact_id.name"/>.
</div>
<t t-if="not doc.use_parties_content">
<h3>Company Information</h3>
<div name="company_address">
<address t-field="doc.company_id.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
</div>
<div name="company_contact">
Represented by <span t-field="doc.company_contact_id.name"/>.
</div>
<h3>Partner Information</h3>
<div name="partner_address">
<address t-field="doc.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
</div>
<div name="partner_contact">
Represented by <span t-field="doc.partner_contact_id.name"/>.
</div>
</t>
<h2>Agreement</h2>
<h3>Recitals</h3>
<table class="table table-condensed">
@ -93,7 +86,7 @@
</tr>
</tbody>
</table>
<t t-if="doc.special_terms">
<t t-if="special_term">
<h2>Special Terms</h2>
<div name="special_term">
<p t-field="doc.dynamic_special_terms"/>
@ -121,7 +114,7 @@
<p>Date: </p>
</td>
<td>
<p t-field="doc.company_id.partner_id"/>
<p t-field="doc.company_partner_id"/>
<p>By: </p>
<p>
Name: <span t-field="doc.company_contact_id.name"/>

26
agreement/security/agreement_security.xml

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="agreement_rule" model="ir.rule">
<field name="name">Agreement multi-company</field>
<field name="model_id" ref="model_agreement"/>
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
</record>
<record id="group_use_agreement_type" model="res.groups">
<field name="name">Use agreement type</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
<record id="group_use_agreement_template" model="res.groups">
<field name="name">Use agreement template</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</odoo>

26
agreement/security/ir.model.access.csv

@ -1,3 +1,25 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_agreement_read,Read access on agreement to Employees,model_agreement,base.group_user,1,0,0,0
access_agreement_full,Full access on agreement grp,model_agreement,base.group_no_one,1,1,1,1
access_agreement_allusers,agreement all users,model_agreement,agreement.group_agreement_user,1,1,1,0
access_agreement_manager,agreement manager,model_agreement,agreement.group_agreement_manager,1,1,1,1
access_agreement_recital_allusers,recital all users,model_agreement_recital,agreement.group_agreement_user,1,1,1,0
access_agreement_recital_manager,recital manager,model_agreement_recital,agreement.group_agreement_manager,1,1,1,1
access_agreement_section_allusers,section all users,model_agreement_section,agreement.group_agreement_user,1,1,1,0
access_agreement_section_manager,section manager,model_agreement_section,agreement.group_agreement_manager,1,1,1,1
access_agreement_clause_allusers,clause all users,model_agreement_clause,agreement.group_agreement_user,1,1,1,0
access_agreement_clause_manager,clause manager,model_agreement_clause,agreement.group_agreement_manager,1,1,1,1
access_agreement_appendix_allusers,appendix all users,model_agreement_appendix,agreement.group_agreement_user,1,1,1,0
access_agreement_appendix_manager,appendix manager,model_agreement_appendix,agreement.group_agreement_manager,1,1,1,1
access_agreement_line_allusers,agreement line all users,model_agreement_line,agreement.group_agreement_user,1,1,1,0
access_agreement_line_manager,agreement line manager,model_agreement_line,agreement.group_agreement_manager,1,1,1,1
access_agreement_servprof_allusers,service profile all users,model_agreement_serviceprofile,agreement.group_agreement_user,1,1,1,0
access_agreement_servprof_manager,service profile manager,model_agreement_serviceprofile,agreement.group_agreement_manager,1,1,1,1
access_agreement_stage_allusers,stage all users,model_agreement_stage,agreement.group_agreement_user,1,0,0,0
access_agreement_stage_manager,stage manager,model_agreement_stage,agreement.group_agreement_manager,1,1,1,1
access_agreement_type_allusers,type all users,model_agreement_type,agreement.group_agreement_user,1,0,0,0
access_agreement_type_manager,type manager,model_agreement_type,agreement.group_agreement_manager,1,1,1,1
access_agreement_subtype_allusers,subtype all users,model_agreement_subtype,agreement.group_agreement_user,1,0,0,0
access_agreement_subtype_manager,subtype manager,model_agreement_subtype,agreement.group_agreement_manager,1,1,1,1
access_agreement_renewaltype_allusers,renewaltype all users,model_agreement_renewaltype,agreement.group_agreement_user,1,0,0,0
access_agreement_renewaltype_manager,renewaltype manager,model_agreement_renewaltype,agreement.group_agreement_manager,1,1,1,1
access_agreement_increasetype_allusers,increasetype all users,model_agreement_increasetype,agreement.group_agreement_user,1,0,0,0
access_agreement_increasetype_manager,increasetype manager,model_agreement_increasetype,agreement.group_agreement_manager,1,1,1,1

19
agreement/security/res_groups.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- User group -->
<record id="group_agreement_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="agreement"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<!-- Manager group -->
<record id="group_agreement_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="agreement"/>
<field name="implied_ids" eval="[(4, ref('group_agreement_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
</odoo>

BIN
agreement/static/description/icon.png

Before

Width: 128  |  Height: 128  |  Size: 9.2 KiB

After

Width: 64  |  Height: 64  |  Size: 6.6 KiB

109
agreement/static/description/index.html

@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Agreement</title>
<title>Agreements</title>
<style type="text/css">
/*
@ -360,74 +360,111 @@ ul.auto-toc {
</style>
</head>
<body>
<div class="document" id="agreement">
<h1 class="title">Agreement</h1>
<div class="document" id="agreements">
<h1 class="title">Agreements</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/contract/tree/12.0/agreement"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/110/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module adds an <em>Agreement</em> object with the following properties:</p>
<ul class="simple">
<li>code,</li>
<li>name,</li>
<li>link to a partner,</li>
<li>signature date.</li>
<li>start date.</li>
<li>end date.</li>
</ul>
<p>Optionally, you can also enable using:
* agreement types
* a flag to set an agreement as a template agreement</p>
<p>(Install agreement_sale to get the configuration settings for these).</p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/contract/tree/11.0/agreement"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/contract-11-0/contract-11-0-agreement"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/110/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>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.</p>
<p>Based on the template, an agreement can be created and the pdf document generated.</p>
<p>The agreement would go through a workflow to finally become a contract with the
customer signature.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
<li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id3">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="id8">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="id9">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#id1">Configuration</a></h1>
<p>To configure this module:</p>
<ul class="simple">
<li>Go to Agreement &gt; Configuration &gt; Templates</li>
<li>Create a new template with sections and clauses and their respective content</li>
<li>Go to Agreement &gt; Configuration &gt; Stages</li>
<li>Create and reorder stages to match your process</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<p>To use this module:</p>
<ul class="simple">
<li>Go to Agreement &gt; Agrements</li>
<li>Create a new agreement</li>
<li>Select a template</li>
<li>Follow the process to get the required approval</li>
<li>Send the invitation to the customer to review and sign the agreement</li>
</ul>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id3">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>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)</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#id4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20agreement%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/contract/issues/new?body=module:%20agreement%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
<h1><a class="toc-backref" href="#id5">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
<h2><a class="toc-backref" href="#id6">Authors</a></h2>
<ul class="simple">
<li>Akretion</li>
<li>Yves Goldberg (Ygol Internetwork)</li>
<li>Pavlov Media</li>
<li>Open Source Integrators</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<h2><a class="toc-backref" href="#id7">Contributors</a></h2>
<ul class="simple">
<li>Patrick Wilson &lt;<a class="reference external" href="mailto:pwilson&#64;pavlovmedia.com">pwilson&#64;pavlovmedia.com</a>&gt;</li>
<li>Bhavesh Odedra &lt;<a class="reference external" href="mailto:bodedra&#64;opensourceintegrators.com">bodedra&#64;opensourceintegrators.com</a>&gt;</li>
<li>Wolfgang Hall &lt;<a class="reference external" href="mailto:whall&#64;opensourceintegrators.com">whall&#64;opensourceintegrators.com</a>&gt;</li>
<li>Maxime Chambreuil &lt;<a class="reference external" href="mailto:mchambreuil&#64;opensourceintegrators.com">mchambreuil&#64;opensourceintegrators.com</a>&gt;</li>
<li>Sandip Mangukiya &lt;<a class="reference external" href="mailto:smangukiya&#64;opensourceintegrators.com">smangukiya&#64;opensourceintegrators.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#id8">Other credits</a></h2>
<p>The development of this module has been financially supported by:</p>
<ul class="simple">
<li>Alexis de Lattre &lt;<a class="reference external" href="mailto:alexis.delattre&#64;akretion.com">alexis.delattre&#64;akretion.com</a>&gt;</li>
<li>Yves Goldberg &lt;<a class="reference external" href="mailto:yves&#64;ygol.com">yves&#64;ygol.com</a>&gt;</li>
<li>Alexandre Fayolle &lt;<a class="reference external" href="mailto:alexandre.fayolle&#64;camptocamp.com">alexandre.fayolle&#64;camptocamp.com</a>&gt;</li>
<li>Pavlov Media</li>
<li>Open Source Integrators</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
<h2><a class="toc-backref" href="#id9">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external" href="https://github.com/ygol"><img alt="ygol" src="https://github.com/ygol.png?size=40px" /></a> <a class="reference external" href="https://github.com/alexis-via"><img alt="alexis-via" src="https://github.com/alexis-via.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/12.0/agreement">OCA/contract</a> project on GitHub.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/11.0/agreement">OCA/contract</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

469
agreement/views/agreement.xml

@ -1,90 +1,399 @@
<?xml version="1.0"?>
<!--
© 2017 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo>
<!-- Agreement List View-->
<record model="ir.ui.view" id="partner_agreement_list_view">
<field name="name">Agreement List</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<tree string="Agreements" default_order='name'>
<field name="name"/>
<field name="partner_id"/>
<field name="company_partner_id"/>
<field name="parent_agreement_id"/>
<field name="agreement_type_id"/>
<field name="agreement_subtype_id"/>
<field name="active" invisible="1"/>
</tree>
</field>
</record>
<!-- Agreement Form View -->
<record model="ir.ui.view" id="partner_agreement_form_view">
<field name="name">Agreement Form</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<form string="Agreements Form">
<header>
<button string="New Version" type="object" name="create_new_version" class="oe_highlight" attrs="{'invisible': [('state', '=', 'active')]}"/>
<button string="New Agreement" type="object" name="create_new_agreement" class="oe_highlight" attrs="{'invisible': [('is_template', '=', False)]}"/>
<field name="stage_id" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Agreement Name"/>
<h1>
<field name="name"/>
</h1>
</div>
<group string="General">
<group>
<field name="reference" readonly="1"/>
<field name="parent_agreement_id"
domain="[('partner_id', '=', partner_id)]"/>
<field name="is_template"/>
</group>
<group>
<field name="agreement_type_id"
widget="selection"
required="True"/>
<field name="agreement_subtype_id"
widget="selection"
domain="[('agreement_type_id', '=', agreement_type_id)]"/>
<field name="assigned_user_id"
attrs="{'invisible': [('is_template', '=', True)], 'readonly':[('is_template', '=', True)]}"/>
<field name="active" invisible="1"/>
<field name="state" invisible="1"/>
</group>
</group>
<group string="Description">
<field name="description"
required="True"
nolabel="1"/>
</group>
<group class="oe_edit_only">
<group>
<field name="field_id"
domain="[('model_id', '=', active_model),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"/>
<field name="sub_object_id" readonly="1"/>
<field name="sub_model_object_field_id"
domain="[('model_id', '=', sub_object_id),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"
attrs="{'readonly':[('sub_object_id', '=', False)],
'required':[('sub_object_id', '!=', False)]}"/>
<field name="default_value"/>
<field name="copyvalue"/>
</group>
<p>
This section (on the left) allows you to add dynamic fields inside the description and special terms.
<ol>
<li>Select the agreement field</li>
<li>Select the sub-field</li>
<li>Enter the default value if the field is empty</li>
<li>Copy and paste the placeholder expression in the description or the special terms</li>
</ol>
</p>
</group>
<group name="parties" string="Parties">
<group name="partner"
string="Partner">
<div class="o_address_format">
<field name="partner_id"
domain="[('customer', '=', True)]"
context="{'show_address': 1}"
options="{&quot;always_reload&quot;: True}"/>
</div>
</group>
<group name="company"
string="Company">
<div class="o_address_format">
<field name="company_partner_id"
readonly="1"
context="{'show_address': 1}"
options="{&quot;always_reload&quot;: True}"/>
</div>
</group>
<group name="partner_left" string="Primary Contact">
<field name="partner_contact_id" domain="[('parent_id', '=', partner_id)]" nolabel="1"/>
<field name="partner_contact_phone" widget="phone" readonly="1" nolabel="1"/>
<field name="partner_contact_email" widget="email" readonly="1" nolabel="1"/>
</group>
<group name="contact_right" string="Primary Contact">
<field name="company_contact_id" domain="[('parent_id', '=', company_partner_id)]" nolabel="1"/>
<field name="company_contact_phone" widget="phone" readonly="1" nolabel="1"/>
<field name="company_contact_email" widget="email" readonly="1" nolabel="1"/>
</group>
</group>
<group name="term_information">
<group name="termdates_left" string="Term Dates">
<field name="start_date" attrs="{'required': [('is_template', '=', False)], 'invisible': [('is_template', '=', True)]}"/>
<field name="end_date" attrs="{'required': [('is_template', '=', False)], 'invisible': [('is_template', '=', True)]}"/>
<field name="expiration_notice"/>
<field name="change_notice"/>
<field name="notification_address_id" domain="['|', ('parent_id', '=', partner_id), ('parent_id', '=', company_partner_id)]"/>
<field name="termination_requested"/>
<field name="termination_date"/>
</group>
<group name="paymentterm_right" string="Payment Terms">
<field name="term" attrs="{'invisible': [('partner_id', '=', False)]}"/>
<field name="payment_term_id" widget="selection"/>
<field name="renewal_type_id" widget="selection"/>
<field name="increase_type_id" widget="selection"/>
</group>
</group>
<group string="Special Terms">
<field name="special_terms"
nolabel="1"/>
</group>
<notebook>
<page name="structure" string="Structure">
<div>
<button name="%(partner_agreement_contract_document_preview)d" string="Preview" type="action" class="oe_highlight"/>
<button name="%(partner_agreement_contract_document)d" string="Print" type="action" class="oe_highlight"/>
</div>
<separator string="Recitals"/>
<field name="recital_ids"
default_order="sequence"
nolabel="1"
context="{'default_agreement': active_id}"/>
<separator string="Sections"/>
<field name="sections_ids"
default_order='sequence'
nolabel="1"
context="{'default_agreement': active_id}"/>
<separator string="Clauses"/>
<field name="clauses_ids"
default_order='clause_id, sequence'
nolabel="1"
context="{'default_agreement': active_id}"/>
<separator string="Appendices"/>
<field name="appendix_ids"
default_order='sequence'
nolabel="1"
context="{'default_agreement': active_id}"/>
</page>
<page name="signature" string="Signatures">
<group>
<group string="Partner">
<field name="partner_signed_date"/>
<field name="partner_signed_user_id" domain="[('parent_id', '=', partner_id)]"/>
</group>
<group string="Company">
<field name="company_signed_date"/>
<field name="company_signed_user_id"/>
<field name="signed_contract" filename="signed_contract_filename"/>
<field name="signed_contract_filename" invisible="1"/>
</group>
</group>
</page>
<page name="products" string="Products/Services">
<field name="line_ids" nolabel="1">
<tree editable="top">
<field name="product_id"/>
<field name="name"/>
<field name="qty"/>
<field name="uom_id" groups="product.group_uom"/>
</tree>
</field>
</page>
<page name="serviceprofiles" string="Service Profiles">
<field name="serviceprofile_ids" nolabel="1">
<tree editable="top">
<field name="name"/>
</tree>
</field>
</page>
<page name="financials" string="Financials">
<group>
<group>
<field name="analytic_id"/>
</group>
<group></group>
</group>
<group string="Revenues and Costs">
<field name="analytic_line_ids"
readonly="1"
nolabel="1"/>
</group>
</page>
<page name="child_agreements" string="Child Agreements">
<field name="child_agreements_ids">
<tree default_order='version desc'>
<field name="name"/>
<field name="version"/>
<field name="revision"/>
</tree>
</field>
</page>
<page name="old_versions" string="Revisions">
<field name="previous_version_agreements_ids" string="Previouse Versions">
<tree default_order='version desc'>
<field name="name"/>
<field name="version"/>
<field name="revision"/>
</tree>
</field>
</page>
<page name="performance" string="Performance">
<p>This section is a place where financial records will show the current performance of this agreement.</p>
<p>Perhaps include invoices with total vs costs? </p>
</page>
</notebook>
<group string="Administration">
<div>
<p>Reviewed by <field name="reviewed_user_id" class="oe_inline"/> on <field name="reviewed_date" class="oe_inline"/>.</p>
<p>Approved by <field name="approved_user_id" class="oe_inline"/> on <field name="approved_date" class="oe_inline"/>.</p>
</div>
</group>
<footer>
Version: <field name="version" readonly="True"/>.<field name="revision" readonly="True"/>
| Created By: <field name="create_uid" readonly="True"/>
| Created On: <field name="create_date" readonly="True"/>
</footer>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<!-- Agreement Kanban View -->
<record id="view_project_agreement_kanban" model="ir.ui.view">
<field name="name">Agreement Kanban</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<kanban default_group_by="stage_id">
<field name="color"/>
<field name="assigned_user_id"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_kanban_content">
<div class="o_kanban_record_top">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title">
<field name="name"/>
</strong><br/>
<div class="o_kanban_record_subtitle text-muted">
<field name="partner_id" invisible="context.get('default_partner_id', False)"/>
<t t-if="record.end_date.raw_value and record.end_date.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
<div t-attf-class="#{red || ''}">
<i><field name="end_date"/></i>
</div>
</div>
</div>
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
<a class="dropdown-toggle btn" data-toggle="dropdown" href="#">
<span class="fa fa-ellipsis-v" aria-hidden="true"/>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<li t-if="widget.editable"><a type="edit">Edit</a></li>
<li class="divider"/>
<li class="dropdown-header">Record's Colour</li>
<li>
<ul class="oe_kanban_colorpicker" data-field="color"/>
</li>
</ul>
</div>
</div>
<div class="o_kanban_record_body">
<field name="agreement_type_id"/> - <field name="agreement_subtype_id"/>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left">
V: <field name="version"/>
</div>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.assigned_user_id.raw_value)" t-att-title="record.assigned_user_id.value" width="36" height="36" class="oe_kanban_avatar"/>
</div>
</div>
</div>
<div class="oe_clear"/>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Agreement Search View -->
<record model="ir.ui.view" id="partner_agreement_search_view">
<field name="name">Agreement Search</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<search string="Agreement Search">
<field name="name"/>
<field name="partner_id"/>
<field name="agreement_type_id"/>
<field name="agreement_subtype_id"/>
<filter name="filter_non_template" string="Non-Templates" domain="[('active','=',True),('is_template', '=', False)]"/>
<filter name="filter_inactive" string="Archived" domain="[('active','=',False)]"/>
<filter name="filter_templates" string="Templates" domain="[('active','=',True),('is_template', '=', True)]"/>
<filter name="group_partner_id" string="Partners" icon="terp-partner" context="{'group_by':'partner_id'}"/>
<filter name="group_status" string="Status" icon="terp-partner" context="{'group_by':'state'}"/>
</search>
</field>
</record>
<!-- Agreement Reporting -->
<record id="agreement_graph_view" model="ir.ui.view">
<field name="name">agreement.graph</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<graph string="Agreements" type="bar">
<field name="stage_id" type="row"/>
</graph>
</field>
</record>
<record id="agreement_pivot_view" model="ir.ui.view">
<field name="name">agreement.pivot</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<pivot string="Agreements" display_quantity="true">
<field name="stage_id" type="row"/>
</pivot>
</field>
</record>
<record id="agreement_form" model="ir.ui.view">
<field name="name">agreement.form</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<form string="Agreement">
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/>
</button>
</div>
<group name="main">
<group name="left">
<field name="agreement_type_id"
groups="agreement.group_use_agreement_type"/>
<field name="is_template" groups="agreement.group_use_agreement_template"/>
<field name="partner_id"
attrs="{'required': [('is_template', '=', False)]}"/>
<field name="name"/>
<field name="signature_date"/>
</group>
<group name="right">
<field name="start_date"/>
<field name="end_date"/>
<field name="code"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
<notebook>
<page name="config" string="Configuration" attrs="{'invisible': True}"/>
</notebook>
</form>
</field>
</record>
<record id="action_agreement_report_order" model="ir.actions.act_window">
<field name="name">Agreements</field>
<field name="res_model">agreement</field>
<field name="view_type">form</field>
<field name="view_mode">graph,pivot</field>
</record>
<record id="agreement_tree" model="ir.ui.view">
<field name="name">agreement.tree</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<tree string="Agreements">
<field name="partner_id"/>
<field name="code"/>
<field name="name"/>
<field name="signature_date"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<!-- Adding a new filter to the order line search view -->
<record id="order_lines_search_view" model="ir.ui.view">
<field name="name">Order Lines Search</field>
<field name="model">sale.order.line</field>
<field name="type">search</field>
<field name="inherit_id" ref="sale.view_sales_order_line_filter"/>
<field name="arch" type="xml">
<xpath expr="/search/filter[1]" position="after">
<filter name="filter_service_product_type" string="Service Type" domain="[('type', '=', 'service')]"/>
</xpath>
</field>
</record>
<record id="agreement_search" model="ir.ui.view">
<field name="name">agreement.search</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<search string="Search Agreements">
<field name="name" filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]" string="Name or Number"/>
<field name="partner_id"/>
<separator/>
<filter name="inactive" string="Archived" domain="[('active', '=', False)]"/>
<group name="groupby">
<filter name="partner_groupby" string="Partner"
context="{'group_by': 'partner_id'}"/>
<filter name="signature_date_groupby" string="Signature Date"
context="{'group_by': 'signature_date'}"/>
</group>
</search>
</field>
</record>
<!-- actions opening views on models -->
<record model="ir.actions.act_window" id="agreement_dashboard_agreement">
<field name="name">Agreements</field>
<field name="res_model">agreement</field>
<field name="domain">[('is_template', '=', False)]</field>
<field name="view_mode">kanban,tree,form</field>
</record>
<record id="agreement_action" model="ir.actions.act_window">
<field name="name">Agreements</field>
<field name="res_model">agreement</field>
<field name="view_mode">tree,form</field>
</record>
<record model="ir.actions.act_window" id="agreement_operations_agreement">
<field name="name">Agreements</field>
<field name="res_model">agreement</field>
<field name="domain">[('is_template', '=', False)]</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="agreement_menu" action="agreement_action"
sequence="100"/>
<record model="ir.actions.act_window" id="partner_agreement_agreement_templates">
<field name="name">Templates</field>
<field name="res_model">agreement</field>
<field name="domain">[('is_template', '=', True)]</field>
<field name="context">[('is_template', '=', True)]</field>
<field name="view_mode">tree,kanban,form</field>
</record>
</odoo>

20
agreement_legal/views/agreement_appendix.xml → agreement/views/agreement_appendix.xml

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<!-- Agreement Appendix List View-->
@ -44,17 +43,26 @@
</group>
<field name="content" widget="html"/>
<group class="oe_edit_only">
<field name="field_domain" widget="domain" nolabel="1"
options="{'model': 'agreement.appendix',
'partial_use': True}" />
<group>
<field name="field_id"
domain="[('model_id', '=', active_model),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"/>
<field name="sub_object_id" readonly="1"/>
<field name="sub_model_object_field_id"
domain="[('model_id', '=', sub_object_id),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"
attrs="{'readonly':[('sub_object_id', '=', False)],
'required':[('sub_object_id', '!=', False)]}"/>
<field name="default_value"/>
<field name="copyvalue"/>
</group>
<p>
This section (on the left) allows you to add dynamic fields inside the content.
<ol>
<li>Select the field using the popup</li>
<li>Select the appendix field</li>
<li>Select the sub-field</li>
<li>Enter the default value if the field is empty</li>
<li>Copy and paste the placeholder expression in the content</li>
</ol>

19
agreement_legal/views/agreement_clause.xml → agreement/views/agreement_clause.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<!-- Agreement Clause List View-->
@ -45,17 +45,26 @@
</group>
<field name="content" widget="html"/>
<group class="oe_edit_only">
<field name="field_domain" widget="domain" nolabel="1"
options="{'model': 'agreement.clause',
'partial_use': True}" />
<group>
<field name="field_id"
domain="[('model_id', '=', active_model),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"/>
<field name="sub_object_id" readonly="1"/>
<field name="sub_model_object_field_id"
domain="[('model_id', '=', sub_object_id),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"
attrs="{'readonly':[('sub_object_id', '=', False)],
'required':[('sub_object_id', '!=', False)]}"/>
<field name="default_value"/>
<field name="copyvalue"/>
</group>
<p>
This section (on the left) allows you to add dynamic fields inside the content.
<ol>
<li>Select the field using the popup</li>
<li>Select the clause field</li>
<li>Select the sub-field</li>
<li>Enter the default value if the field is empty</li>
<li>Copy and paste the placeholder expression in the content</li>
</ol>

2
agreement_legal/views/agreement_increasetype.xml → agreement/views/agreement_increasetype.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<!-- Agreement Increase Type List View-->

25
agreement_legal/views/agreement_recital.xml → agreement/views/agreement_recital.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<!-- Agreement Recital List View-->
@ -24,10 +24,8 @@
<form string="Recital">
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"
options="{&quot;terminology&quot;: &quot;archive&quot;}"/>
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options="{&quot;terminology&quot;: &quot;archive&quot;}"/>
</button>
</div>
<div class="oe_title">
@ -45,17 +43,26 @@
</group>
<field name="content" widget="html"/>
<group class="oe_edit_only">
<field name="field_domain" widget="domain" nolabel="1"
options="{'model': 'agreement.recital',
'partial_use': True}" />
<group>
<field name="field_id"
domain="[('model_id', '=', active_model),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"/>
<field name="sub_object_id" readonly="1"/>
<field name="sub_model_object_field_id"
domain="[('model_id', '=', sub_object_id),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"
attrs="{'readonly':[('sub_object_id', '=', False)],
'required':[('sub_object_id', '!=', False)]}"/>
<field name="default_value"/>
<field name="copyvalue"/>
</group>
<p>
This section (on the left) allows you to add dynamic fields inside the content.
<ol>
<li>Select the field using the popup</li>
<li>Select the recital field</li>
<li>Select the sub-field</li>
<li>Enter the default value if the field is empty</li>
<li>Copy and paste the placeholder expression in the content</li>
</ol>

2
agreement_legal/views/agreement_renewaltype.xml → agreement/views/agreement_renewaltype.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<!-- Agreement Renewal Type List View-->

19
agreement_legal/views/agreement_section.xml → agreement/views/agreement_section.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<!-- Agreement Sections List View-->
@ -45,17 +45,26 @@
<page string="Content">
<field name='content' nolabel="1"/>
<group class="oe_edit_only">
<field name="field_domain" widget="domain" nolabel="1"
options="{'model': 'agreement.section',
'partial_use': True}" />
<group>
<field name="field_id"
domain="[('model_id', '=', active_model),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"/>
<field name="sub_object_id" readonly="1"/>
<field name="sub_model_object_field_id"
domain="[('model_id', '=', sub_object_id),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"
attrs="{'readonly':[('sub_object_id', '=', False)],
'required':[('sub_object_id', '!=', False)]}"/>
<field name="default_value"/>
<field name="copyvalue"/>
</group>
<p>
This section (on the left) allows you to add dynamic fields inside the content.
<ol>
<li>Select the field using the popup</li>
<li>Select the section field</li>
<li>Select the sub-field</li>
<li>Enter the default value if the field is empty</li>
<li>Copy and paste the placeholder expression in the content</li>
</ol>

62
agreement/views/agreement_serviceprofile.xml

@ -0,0 +1,62 @@
<?xml version="1.0"?>
<odoo>
<!-- Agreement Service Profile List View-->
<record model="ir.ui.view" id="agreement_serviceprofile_tree">
<field name="name">Agreement Service Profile Tree</field>
<field name="model">agreement.serviceprofile</field>
<field name="arch" type="xml">
<tree string="Service Profiles" default_order='agreement_id'>
<field name="name"/>
<field name="agreement_id"/>
<field name="active" invisible="1"/>
</tree>
</field>
</record>
<!-- Agreement Service Profile Form View -->
<record model="ir.ui.view" id="agreement_serviceprofile_form">
<field name="name">Agreement Service Profile Form</field>
<field name="model">agreement.serviceprofile</field>
<field name="arch" type="xml">
<form string="Service Profile">
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options="{&quot;terminology&quot;: &quot;archive&quot;}"/>
</button>
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
</div>
<group>
<group>
<field name="agreement_id"/>
</group>
<group></group>
</group>
</sheet>
</form>
</field>
</record>
<!-- Agreement Service Profile Search View -->
<record model="ir.ui.view" id="agreement_serviceprofile_search">
<field name="name">Agreement Service Profile Search</field>
<field name="model">agreement.serviceprofile</field>
<field name="arch" type="xml">
<search>
<filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
</search>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="agreement_serviceprofile_action">
<field name="name">Service Profiles</field>
<field name="res_model">agreement.serviceprofile</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>

4
agreement_legal/views/agreement_stages.xml → agreement/views/agreement_stages.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<!-- Agreement Stage List View-->
@ -9,7 +9,6 @@
<tree default_order='sequence, name'>
<field name="sequence" widget="handle"/>
<field name="name" string="Stage Name"/>
<field name="stage_type"/>
</tree>
</field>
</record>
@ -27,7 +26,6 @@
</div>
<group>
<field name="sequence"/>
<field name="stage_type"/>
<field name="fold"/>
</group>
</sheet>

2
agreement_legal/views/agreement_subtype.xml → agreement/views/agreement_subtype.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<!-- Agreement Sub Type List View-->

37
agreement/views/agreement_type.xml

@ -1,54 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<!-- Agreement Type List View-->
<record model="ir.ui.view" id="agreement_type_list_view">
<record model="ir.ui.view" id="partner_agreement_type_list_view">
<field name="name">Agreement Type List</field>
<field name="model">agreement.type</field>
<field name="arch" type="xml">
<tree string="Agreement Types" default_order="name">
<tree string="Agreement Types" default_order='name'>
<field name="name" string="Type Name"/>
<field name="agreement_subtypes_ids" string="Sub-Types"/>
</tree>
</field>
</record>
<!-- Agreement Type Form View -->
<record model="ir.ui.view" id="agreement_type_form_view">
<record model="ir.ui.view" id="partner_agreement_type_form_view">
<field name="name">Agreement Type Form</field>
<field name="model">agreement.type</field>
<field name="arch" type="xml">
<form string="Agreement Type">
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object"
class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"
options='{"terminology": "archive"}'/>
</button>
</div>
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
</div>
<field name="agreement_subtypes_ids"
nolabel="1">
<tree editable="bottom">
<field name="name"/>
</tree>
</field>
</sheet>
</form>
</field>
</record>
<record id="agreement_type_search" model="ir.ui.view">
<field name="name">agreement.type.search</field>
<field name="model">agreement.type</field>
<field name="arch" type="xml">
<search string="Agreement Type">
<field name="name"/>
<filter name="archived" string="Archived" domain="[('active', '=', False)]"/>
</search>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="agreement_type_action">
<record model="ir.actions.act_window" id="partner_agreement_action_type">
<field name="name">Agreement Types</field>
<field name="res_model">agreement.type</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>

35
agreement_legal/views/menu.xml → agreement/views/menu.xml

@ -1,22 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<!-- Remove top menu from agreement module -->
<!-- <delete model="ir.ui.menu" id="agreement.agreement_menu" /> -->
<!-- Top menu item -->
<menuitem
name="Agreements"
id="agreement.agreement_menu"
web_icon="agreement_legal,static/description/icon.png"
id="agreement_root"
web_icon="agreement,static/description/icon.png"
sequence="80"
action="agreement_dashboard_agreement"
groups="agreement_legal.group_agreement_readonly"/>
groups="agreement.group_agreement_user"/>
<!-- Dashboard -->
<menuitem
name="Dashboard"
id="agreement_dashboard"
parent="agreement.agreement_menu"
parent="agreement_root"
sequence="10"/>
<menuitem
name="Agreements"
@ -29,7 +26,7 @@
<menuitem
name="Operations"
id="agreement_operations"
parent="agreement.agreement_menu"
parent="agreement_root"
sequence="20"/>
<menuitem
name="Agreements"
@ -42,7 +39,7 @@
<menuitem
name="Master Data"
id="agreement_masterdata"
parent="agreement.agreement_menu"
parent="agreement_root"
sequence="30"/>
<menuitem
name="Contents"
@ -73,6 +70,12 @@
parent="agreement_data_contents"
sequence="40"
action="agreement_appendix_action"/>
<menuitem
name="Service Profiles"
id="agreement_serviceprofiles"
parent="agreement_masterdata"
sequence="50"
action="agreement_serviceprofile_action"/>
<menuitem
name="Products"
id="agreement_products"
@ -85,8 +88,8 @@
name="Reporting"
id="agreement_reporting"
sequence="40"
parent="agreement.agreement_menu"
groups="agreement_legal.group_agreement_manager"/>
parent="agreement_root"
groups="agreement.group_agreement_manager"/>
<menuitem
name="Agreements"
@ -100,14 +103,14 @@
name="Configuration"
id="agreement_configuration"
sequence="50"
parent="agreement.agreement_menu"
groups="agreement_legal.group_agreement_manager"/>
parent="agreement_root"
groups="agreement.group_agreement_manager"/>
<menuitem
name="Settings"
id="agreement_settings"
sequence="10"
parent="agreement_configuration"
action="agreement_legal.action_agreement_config"/>
action="agreement.action_agreement_config"/>
<menuitem
name="Templates"
id="template"

28
agreement_legal/views/res_config_settings.xml → agreement/views/res_config_settings.xml

@ -11,8 +11,8 @@
<div class="app_settings_block"
data-string="Agreements"
string="Agreements"
data-key="agreement_legal"
groups="agreement_legal.group_agreement_manager">
data-key="agreement"
groups="agreement.group_agreement_manager">
<h2>Operations</h2>
<div class="row mt16 o_settings_container">
<div class="col-xs-12 col-md-6 o_setting_box">
@ -26,7 +26,7 @@
</div>
<div class="content-group">
<div class="mt16" attrs="{'invisible': [('group_uom', '=', False)]}">
<button name="%(uom.product_uom_form_action)d" icon="fa-arrow-right" type="action" string="Units Of Measure" class="btn-link"/>
<button name="%(product.product_uom_form_action)d" icon="fa-arrow-right" type="action" string="Units Of Measure" class="btn-link"/>
</div>
</div>
</div>
@ -39,7 +39,7 @@
<field name="module_agreement_sale"/>
</div>
<div class="o_setting_right_pane">
<label for="" string="Sales"/>
<label string="Sales"/>
<div class="text-muted">
Create an agreement when the sales order is confirmed
</div>
@ -51,7 +51,7 @@
<field name="module_agreement_sale_subscription"/>
</div>
<div class="o_setting_right_pane">
<label for="" string="Sale Subscriptions"/>
<label string="Sale Subscriptions"/>
<div class="text-muted">
Link your subscriptions to an agreement
</div>
@ -62,7 +62,7 @@
<field name="module_fieldservice_agreement"/>
</div>
<div class="o_setting_right_pane">
<label for="" string="Field Service"/>
<label string="Field Service"/>
<div class="text-muted">
Link your Field Service orders and equipments to an agreement
</div>
@ -73,7 +73,7 @@
<field name="module_agreement_stock"/>
</div>
<div class="o_setting_right_pane">
<label for="" string="Inventory"/>
<label string="Inventory"/>
<div class="text-muted">
Link your transfers to an agreement
</div>
@ -84,7 +84,7 @@
<field name="module_agreement_rma"/>
</div>
<div class="o_setting_right_pane">
<label for="" string="Returns"/>
<label string="Returns"/>
<div class="text-muted">
Link your returns to an agreement
</div>
@ -95,7 +95,7 @@
<field name="module_agreement_maintenance"/>
</div>
<div class="o_setting_right_pane">
<label for="" string="Maintenance"/>
<label string="Maintenance"/>
<div class="text-muted">
Manage maintenance agreements and contracts
</div>
@ -106,7 +106,7 @@
<field name="module_agreement_mrp"/>
</div>
<div class="o_setting_right_pane">
<label for="" string="Manufacturing"/>
<label string="Manufacturing"/>
<div class="text-muted">
Link your manufacturing orders to an agreement
</div>
@ -117,7 +117,7 @@
<field name="module_agreement_repair"/>
</div>
<div class="o_setting_right_pane">
<label for="" string="Repair"/>
<label string="Repair"/>
<div class="text-muted">
Link your repair orders to an agreement
</div>
@ -128,7 +128,7 @@
<field name="module_agreement_project"/>
</div>
<div class="o_setting_right_pane">
<label for="" string="Project"/>
<label string="Project"/>
<div class="text-muted">
Link your projects and tasks to an agreement
</div>
@ -136,10 +136,10 @@
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_agreement_helpdesk"/>
<field name="module_helpdesk_agreement"/>
</div>
<div class="o_setting_right_pane">
<label for="" string="Helpdesk"/>
<label string="Helpdesk"/>
<div class="text-muted">
Link your Helpdesk tickets to an agreement
</div>

2
agreement_legal/views/res_partner.xml → agreement/views/res_partner.xml

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0"?>
<odoo>
<record model="ir.ui.view" id="partner_form">

142
agreement_legal/README.rst

@ -1,142 +0,0 @@
================
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 <pwilson@pavlovmedia.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Wolfgang Hall <whall@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>
* Yves Goldberg <yves@ygol.com>
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
agreement_legal/__init__.py

@ -1,12 +0,0 @@
# 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
agreement_legal/__manifest__.py

@ -1,51 +0,0 @@
# 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": "12.0.1.1.1",
"depends": ["contacts", "agreement", "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"
],
}

40
agreement_legal/demo/demo.xml

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
© 2019 Ygol Internetwork (yves@ygol.com)
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>

1697
agreement_legal/i18n/agreement_legal.pot
File diff suppressed because it is too large
View File

1983
agreement_legal/i18n/fr.po
File diff suppressed because it is too large
View File

1710
agreement_legal/i18n/pt_BR.po
File diff suppressed because it is too large
View File

1730
agreement_legal/i18n/pt_PT.po
File diff suppressed because it is too large
View File

1740
agreement_legal/i18n/zh_CN.po
File diff suppressed because it is too large
View File

18
agreement_legal/models/__init__.py

@ -1,18 +0,0 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import (
res_config_settings,
agreement_stage,
agreement,
agreement_appendix,
agreement_clause,
agreement_line,
agreement_recital,
agreement_section,
agreement_type,
agreement_subtype,
res_partner,
product_template,
agreement_renewaltype,
agreement_increasetype,
)

371
agreement_legal/models/agreement.py

@ -1,371 +0,0 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class Agreement(models.Model):
_name = "agreement"
_inherit = ["agreement", "mail.thread"]
# General
name = fields.Char(string="Title", required=True)
version = fields.Integer(
string="Version",
default=1,
copy=False,
help="The versions are used to keep track of document history and "
"previous versions can be referenced.")
revision = fields.Integer(
string="Revision",
default=0,
copy=False,
help="The revision will increase with every save event.")
description = fields.Text(
string="Description",
track_visibility="onchange",
help="Description of the agreement")
dynamic_description = fields.Text(
compute="_compute_dynamic_description",
string="Dynamic Description",
help="Compute dynamic description")
start_date = fields.Date(
string="Start Date",
track_visibility="onchange",
help="When the agreement starts.")
end_date = fields.Date(
string="End Date",
track_visibility="onchange",
help="When the agreement ends.")
color = fields.Integer(string="Color")
active = fields.Boolean(
string="Active",
default=True,
help="If unchecked, it will allow you to hide the agreement without "
"removing it.")
company_signed_date = fields.Date(
string="Signed on",
track_visibility="onchange",
help="Date the contract was signed by Company.")
partner_signed_date = fields.Date(
string="Signed on (Partner)",
track_visibility="onchange",
help="Date the contract was signed by the Partner.")
term = fields.Integer(
string="Term (Months)",
track_visibility="onchange",
help="Number of months this agreement/contract is in effect with the "
"partner.")
expiration_notice = fields.Integer(
string="Exp. Notice (Days)",
track_visibility="onchange",
help="Number of Days before expiration to be notified.")
change_notice = fields.Integer(
string="Change Notice (Days)",
track_visibility="onchange",
help="Number of Days to be notified before changes.")
special_terms = fields.Text(
string="Special Terms",
track_visibility="onchange",
help="Any terms that you have agreed to and want to track on the "
"agreement/contract.")
dynamic_special_terms = fields.Text(
compute="_compute_dynamic_special_terms",
string="Dynamic Special Terms",
help="Compute dynamic special terms")
code = fields.Char(
string="Reference",
required=True,
default=lambda self: _("New"),
track_visibility="onchange",
copy=False,
help="ID used for internal contract tracking.")
increase_type_id = fields.Many2one(
"agreement.increasetype",
string="Increase Type",
track_visibility="onchange",
help="The amount that certain rates may increase.")
termination_requested = fields.Date(
string="Termination Requested Date",
track_visibility="onchange",
help="Date that a request for termination was received.")
termination_date = fields.Date(
string="Termination Date",
track_visibility="onchange",
help="Date that the contract was terminated.")
reviewed_date = fields.Date(
string="Reviewed Date", track_visibility="onchange")
reviewed_user_id = fields.Many2one(
"res.users", string="Reviewed By", track_visibility="onchange")
approved_date = fields.Date(
string="Approved Date", track_visibility="onchange")
approved_user_id = fields.Many2one(
"res.users", string="Approved By", track_visibility="onchange")
currency_id = fields.Many2one("res.currency", string="Currency")
partner_id = fields.Many2one(
"res.partner",
string="Partner",
required=False,
copy=True,
help="The customer or vendor this agreement is related to.")
partner_contact_id = fields.Many2one(
"res.partner",
string="Partner Contact",
copy=True,
help="The primary partner contact (If Applicable).")
partner_contact_phone = fields.Char(
related="partner_contact_id.phone", string="Partner Phone")
partner_contact_email = fields.Char(
related="partner_contact_id.email", string="Partner Email")
company_contact_id = fields.Many2one(
"res.partner",
string="Company Contact",
copy=True,
help="The primary contact in the company.")
company_contact_phone = fields.Char(
related="company_contact_id.phone", string="Phone")
company_contact_email = fields.Char(
related="company_contact_id.email", string="Email")
use_parties_content = fields.Boolean(
string="Use parties content",
help="Use custom content for parties")
def _get_default_parties(self):
deftext = """
<h3>Company Information</h3>
<p>
${object.company_id.partner_id.name or ''}.<br>
${object.company_id.partner_id.street or ''} <br>
${object.company_id.partner_id.state_id.code or ''}
${object.company_id.partner_id.zip or ''}
${object.company_id.partner_id.city or ''}<br>
${object.company_id.partner_id.country_id.name or ''}.<br><br>
Represented by <b>${object.company_contact_id.name or ''}.</b>
</p>
<p></p>
<h3>Partner Information</h3>
<p>
${object.partner_id.name or ''}.<br>
${object.partner_id.street or ''} <br>
${object.partner_id.state_id.code or ''}
${object.partner_id.zip or ''} ${object.partner_id.city or ''}<br>
${object.partner_id.country_id.name or ''}.<br><br>
Represented by <b>${object.partner_contact_id.name or ''}.</b>
</p>
"""
return deftext
parties = fields.Html(
string="Parties",
track_visibility="onchange",
default=_get_default_parties,
help="Parties of the agreement")
dynamic_parties = fields.Html(
compute="_compute_dynamic_parties",
string="Dynamic Parties",
help="Compute dynamic parties")
agreement_type_id = fields.Many2one(
track_visibility="onchange",
)
agreement_subtype_id = fields.Many2one(
"agreement.subtype",
string="Agreement Sub-type",
track_visibility="onchange",
help="Select the sub-type of this agreement. Sub-Types are related to "
"agreement types.")
product_ids = fields.Many2many(
"product.template", string="Products & Services")
assigned_user_id = fields.Many2one(
"res.users",
string="Assigned To",
track_visibility="onchange",
help="Select the user who manages this agreement.")
company_signed_user_id = fields.Many2one(
"res.users",
string="Signed By",
track_visibility="onchange",
help="The user at our company who authorized/signed the agreement or "
"contract.")
partner_signed_user_id = fields.Many2one(
"res.partner",
string="Signed By (Partner)",
track_visibility="onchange",
help="Contact on the account that signed the agreement/contract.")
parent_agreement_id = fields.Many2one(
"agreement",
string="Parent Agreement",
help="Link this agreement to a parent agreement. For example if this "
"agreement is an amendment to another agreement. This list will "
"only show other agreements related to the same account.")
renewal_type_id = fields.Many2one(
"agreement.renewaltype",
string="Renewal Type",
track_visibility="onchange",
help="Describes what happens after the contract expires.")
recital_ids = fields.One2many(
"agreement.recital", "agreement_id", string="Recitals", copy=True)
sections_ids = fields.One2many(
"agreement.section", "agreement_id", string="Sections", copy=True)
clauses_ids = fields.One2many(
"agreement.clause", "agreement_id", string="Clauses")
appendix_ids = fields.One2many(
"agreement.appendix", "agreement_id", string="Appendices", copy=True)
previous_version_agreements_ids = fields.One2many(
"agreement",
"parent_agreement_id",
string="Previous Versions",
copy=False,
domain=[("active", "=", False)])
child_agreements_ids = fields.One2many(
"agreement",
"parent_agreement_id",
string="Child Agreements",
copy=False,
domain=[("active", "=", True)])
line_ids = fields.One2many(
"agreement.line",
"agreement_id",
string="Products/Services",
copy=False)
state = fields.Selection(
[("draft", "Draft"), ("active", "Active"), ("inactive", "Inactive")],
default="draft",
track_visibility="always")
notification_address_id = fields.Many2one(
"res.partner",
string="Notification Address",
help="The address to send notificaitons to, if different from "
"customer address.(Address Type = Other)")
signed_contract_filename = fields.Char(string="Filename")
signed_contract = fields.Binary(
string="Signed Document", track_visibility="always")
# Dynamic field editor
field_domain = fields.Char(string='Field Expression',
default='[["active", "=", True]]')
default_value = fields.Char(
string="Default Value",
help="Optional value to use if the target field is empty.")
copyvalue = fields.Char(
string="Placeholder Expression",
help="""Final placeholder expression, to be copy-pasted in the desired
template field.""")
@api.onchange("field_domain", "default_value")
def onchange_copyvalue(self):
self.copyvalue = False
if self.field_domain:
string_list = self.field_domain.split(",")
if string_list:
field_domain = string_list[0][3:-1]
self.copyvalue = "${{object.{} or {}}}".format(
field_domain,
self.default_value or "''")
# compute the dynamic content for mako expression
@api.multi
def _compute_dynamic_description(self):
MailTemplates = self.env["mail.template"]
for agreement in self:
lang = agreement.partner_id.lang or "en_US"
description = MailTemplates.with_context(
lang=lang
)._render_template(
agreement.description, "agreement", agreement.id
)
agreement.dynamic_description = description
@api.multi
def _compute_dynamic_parties(self):
MailTemplates = self.env["mail.template"]
for agreement in self:
lang = agreement.partner_id.lang or "en_US"
parties = MailTemplates.with_context(
lang=lang
)._render_template(
agreement.parties, "agreement", agreement.id
)
agreement.dynamic_parties = parties
@api.multi
def _compute_dynamic_special_terms(self):
MailTemplates = self.env["mail.template"]
for agreement in self:
lang = agreement.partner_id.lang or "en_US"
special_terms = MailTemplates.with_context(
lang=lang
)._render_template(
agreement.special_terms, "agreement", agreement.id
)
agreement.dynamic_special_terms = special_terms
# Used for Kanban grouped_by view
@api.model
def _read_group_stage_ids(self, stages, domain, order):
stage_ids = self.env["agreement.stage"].search(
[('stage_type', '=', 'agreement')])
return stage_ids
stage_id = fields.Many2one(
"agreement.stage",
string="Stage",
group_expand="_read_group_stage_ids",
help="Select the current stage of the agreement.",
track_visibility="onchange",
index=True)
# Create New Version Button
@api.multi
def create_new_version(self, vals):
for rec in self:
if not rec.state == "draft":
# Make sure status is draft
rec.state = "draft"
default_vals = {
"name": "{} - OLD VERSION".format(rec.name),
"active": False,
"parent_agreement_id": rec.id,
}
# Make a current copy and mark it as old
rec.copy(default=default_vals)
# Increment the Version
rec.version = rec.version + 1
# Reset revision to 0 since it's a new version
vals["revision"] = 0
return super(Agreement, self).write(vals)
def create_new_agreement(self):
default_vals = {
"name": "NEW",
"active": True,
"version": 1,
"revision": 0,
"state": "draft",
"stage_id": self.env.ref("agreement_legal.agreement_stage_new").id,
}
res = self.copy(default=default_vals)
res.sections_ids.clauses_ids.write({'agreement_id': res.id})
return {
"res_model": "agreement",
"type": "ir.actions.act_window",
"view_mode": "form",
"view_type": "form",
"res_id": res.id,
}
@api.model
def create(self, vals):
if vals.get("code", _("New")) == _("New"):
vals["code"] = self.env["ir.sequence"].next_by_code(
"agreement"
) or _("New")
if not vals.get('stage_id'):
vals["stage_id"] = \
self.env.ref("agreement_legal.agreement_stage_new").id
return super(Agreement, self).create(vals)
# Increments the revision on each save action
@api.multi
def write(self, vals):
vals["revision"] = self.revision + 1
return super(Agreement, self).write(vals)

73
agreement_legal/models/agreement_appendix.py

@ -1,73 +0,0 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AgreementAppendix(models.Model):
_name = "agreement.appendix"
_description = "Agreement Appendices"
_order = "sequence"
name = fields.Char(string="Name", required=True)
title = fields.Char(
string="Title",
required=True,
help="The title is displayed on the PDF." "The name is not.",
)
sequence = fields.Integer(
string="Sequence",
default=10)
content = fields.Html(string="Content")
dynamic_content = fields.Html(
compute="_compute_dynamic_content",
string="Dynamic Content",
help="compute dynamic Content",
)
agreement_id = fields.Many2one(
"agreement",
string="Agreement",
ondelete="cascade")
active = fields.Boolean(
string="Active",
default=True,
help="If unchecked, it will allow you to hide this appendix without "
"removing it.",
)
# Dynamic field editor
field_domain = fields.Char(string='Field Expression',
default='[["active", "=", True]]')
default_value = fields.Char(
string="Default Value",
help="Optional value to use if the target field is empty.")
copyvalue = fields.Char(
string="Placeholder Expression",
help="""Final placeholder expression, to be copy-pasted in the desired
template field.""")
@api.onchange("field_domain", "default_value")
def onchange_copyvalue(self):
self.copyvalue = False
if self.field_domain:
string_list = self.field_domain.split(",")
if string_list:
field_domain = string_list[0][3:-1]
self.copyvalue = "${{object.{} or {}}}".format(
field_domain,
self.default_value or "''")
# compute the dynamic content for mako expression
@api.multi
def _compute_dynamic_content(self):
MailTemplates = self.env["mail.template"]
for appendix in self:
lang = (
appendix.agreement_id
and appendix.agreement_id.partner_id.lang
or "en_US"
)
content = MailTemplates.with_context(lang=lang)._render_template(
appendix.content, "agreement.appendix", appendix.id
)
appendix.dynamic_content = content

71
agreement_legal/models/agreement_clause.py

@ -1,71 +0,0 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AgreementClause(models.Model):
_name = "agreement.clause"
_description = "Agreement Clauses"
_order = "sequence"
name = fields.Char(string="Name", required=True)
title = fields.Char(
string="Title",
help="The title is displayed on the PDF." "The name is not.")
sequence = fields.Integer(string="Sequence")
agreement_id = fields.Many2one(
"agreement",
string="Agreement",
ondelete="cascade")
section_id = fields.Many2one(
"agreement.section",
string="Section",
ondelete="cascade")
content = fields.Html(string="Clause Content")
dynamic_content = fields.Html(
compute="_compute_dynamic_content",
string="Dynamic Content",
help="compute dynamic Content")
active = fields.Boolean(
string="Active",
default=True,
help="If unchecked, it will allow you to hide the agreement without "
"removing it.")
# Dynamic field editor
field_domain = fields.Char(string='Field Expression',
default='[["active", "=", True]]')
default_value = fields.Char(
string="Default Value",
help="Optional value to use if the target field is empty.")
copyvalue = fields.Char(
string="Placeholder Expression",
help="""Final placeholder expression, to be copy-pasted in the desired
template field.""")
@api.onchange("field_domain", "default_value")
def onchange_copyvalue(self):
self.copyvalue = False
if self.field_domain:
string_list = self.field_domain.split(",")
if string_list:
field_domain = string_list[0][3:-1]
self.copyvalue = "${{object.{} or {}}}".format(
field_domain,
self.default_value or "''")
# compute the dynamic content for mako expression
@api.multi
def _compute_dynamic_content(self):
MailTemplates = self.env["mail.template"]
for clause in self:
lang = (
clause.agreement_id
and clause.agreement_id.partner_id.lang
or "en_US"
)
content = MailTemplates.with_context(lang=lang)._render_template(
clause.content, "agreement.clause", clause.id
)
clause.dynamic_content = content

30
agreement_legal/models/agreement_line.py

@ -1,30 +0,0 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AgreementLine(models.Model):
_name = "agreement.line"
_description = "Agreement Lines"
product_id = fields.Many2one(
"product.product",
string="Product")
name = fields.Char(
string="Description",
required=True)
agreement_id = fields.Many2one(
"agreement",
string="Agreement",
ondelete="cascade")
qty = fields.Float(string="Quantity")
uom_id = fields.Many2one(
"uom.uom",
string="Unit of Measure",
required=True)
@api.onchange("product_id")
def _onchange_product_id(self):
self.name = self.product_id.name
self.uom_id = self.product_id.uom_id.id

63
agreement_legal/models/agreement_recital.py

@ -1,63 +0,0 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AgreementRecital(models.Model):
_name = "agreement.recital"
_description = "Agreement Recitals"
_order = "sequence"
name = fields.Char(string="Name", required=True)
title = fields.Char(
string="Title",
help="The title is displayed on the PDF." "The name is not.")
sequence = fields.Integer(string="Sequence", default=10)
content = fields.Html(string="Content")
dynamic_content = fields.Html(
compute="_compute_dynamic_content",
string="Dynamic Content",
help="compute dynamic Content")
agreement_id = fields.Many2one(
"agreement", string="Agreement", ondelete="cascade")
active = fields.Boolean(
string="Active",
default=True,
help="If unchecked, it will allow you to hide this recital without "
"removing it.")
# Dynamic field editor
field_domain = fields.Char(string='Field Expression',
default='[["active", "=", True]]')
default_value = fields.Char(
string="Default Value",
help="Optional value to use if the target field is empty.")
copyvalue = fields.Char(
string="Placeholder Expression",
help="""Final placeholder expression, to be copy-pasted in the desired
template field.""")
@api.onchange("field_domain", "default_value")
def onchange_copyvalue(self):
self.copyvalue = False
if self.field_domain:
string_list = self.field_domain.split(",")
if string_list:
field_domain = string_list[0][3:-1]
self.copyvalue = "${{object.{} or {}}}".format(
field_domain,
self.default_value or "''")
# compute the dynamic content for mako expression
@api.multi
def _compute_dynamic_content(self):
MailTemplates = self.env["mail.template"]
for recital in self:
lang = (
recital.agreement_id
and recital.agreement_id.partner_id.lang
or "en_US")
content = MailTemplates.with_context(lang=lang)._render_template(
recital.content, "agreement.recital", recital.id)
recital.dynamic_content = content

63
agreement_legal/models/agreement_section.py

@ -1,63 +0,0 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AgreementSection(models.Model):
_name = "agreement.section"
_description = "Agreement Sections"
_order = "sequence"
name = fields.Char(string="Name", required=True)
title = fields.Char(
string="Title",
help="The title is displayed on the PDF. The name is not.")
sequence = fields.Integer(string="Sequence")
agreement_id = fields.Many2one(
"agreement", string="Agreement", ondelete="cascade")
clauses_ids = fields.One2many(
"agreement.clause", "section_id", string="Clauses", copy=True)
content = fields.Html(string="Section Content")
dynamic_content = fields.Html(
compute="_compute_dynamic_content",
string="Dynamic Content",
help="compute dynamic Content")
active = fields.Boolean(
string="Active",
default=True,
help="If unchecked, it will allow you to hide the agreement without "
"removing it.")
# Dynamic field editor
field_domain = fields.Char(string='Field Expression',
default='[["active", "=", True]]')
default_value = fields.Char(
string="Default Value",
help="Optional value to use if the target field is empty.")
copyvalue = fields.Char(
string="Placeholder Expression",
help="""Final placeholder expression, to be copy-pasted in the desired
template field.""")
@api.onchange("field_domain", "default_value")
def onchange_copyvalue(self):
self.copyvalue = False
if self.field_domain:
string_list = self.field_domain.split(",")
if string_list:
field_domain = string_list[0][3:-1]
self.copyvalue = "${{object.{} or {}}}".format(
field_domain,
self.default_value or "''")
# compute the dynamic content for mako expression
@api.multi
def _compute_dynamic_content(self):
MailTemplates = self.env["mail.template"]
for section in self:
lang = (section.agreement_id and
section.agreement_id.partner_id.lang or "en_US")
content = MailTemplates.with_context(lang=lang)._render_template(
section.content, "agreement.section", section.id)
section.dynamic_content = content

12
agreement_legal/models/agreement_status.py

@ -1,12 +0,0 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
# Main Agreement Status Records Model
class AgreementStatus(models.Model):
_name = "agreement.type"
# General
name = fields.Char(string="Title", required=True)

15
agreement_legal/models/agreement_type.py

@ -1,15 +0,0 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AgreementType(models.Model):
_inherit = "agreement.type"
_description = "Agreement Types"
agreement_subtypes_ids = fields.One2many(
"agreement.subtype",
"agreement_type_id",
string="Subtypes"
)

12
agreement_legal/models/product_template.py

@ -1,12 +0,0 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Product(models.Model):
_inherit = "product.template"
agreements_ids = fields.Many2many(
"agreement",
string="Agreements")

38
agreement_legal/models/res_config_settings.py

@ -1,38 +0,0 @@
# Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
module_agreement_maintenance = fields.Boolean(
string="Manage maintenance agreements and contracts."
)
module_agreement_mrp = fields.Boolean(
string="Link your manufacturing orders to an agreement."
)
module_agreement_project = fields.Boolean(
string="Link your projects and tasks to an agreement."
)
module_agreement_repair = fields.Boolean(
string="Link your repair orders to an agreement."
)
module_agreement_rma = fields.Boolean(
string="Link your RMAs to an agreement.")
module_agreement_sale = fields.Boolean(
string="Create an agreement when the sale order is confirmed."
)
module_agreement_sale_subscription = fields.Boolean(
string="Link your subscriptions to an agreement."
)
module_agreement_stock = fields.Boolean(
string="Link your pickings to an agreement."
)
module_fieldservice_agreement = fields.Boolean(
string="Link your Field Service orders and equipments to an agreement."
)
module_agreement_helpdesk = fields.Boolean(
string="Link your Helpdesk tickets to an agreement."
)

13
agreement_legal/models/res_partner.py

@ -1,13 +0,0 @@
# Copyright (C) 2018 - TODAY, Pavlov Media
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Partner(models.Model):
_inherit = "res.partner"
agreement_ids = fields.One2many(
"agreement",
"partner_id",
string="Agreements")

6
agreement_legal/readme/CONTRIBUTORS.rst

@ -1,6 +0,0 @@
* Patrick Wilson <pwilson@pavlovmedia.com>
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
* Wolfgang Hall <whall@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>
* Yves Goldberg <yves@ygol.com>

9
agreement_legal/readme/DESCRIPTION.rst

@ -1,9 +0,0 @@
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.

13
agreement_legal/readme/USAGE.rst

@ -1,13 +0,0 @@
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}"/>

29
agreement_legal/security/ir.model.access.csv

@ -1,29 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_agreement_readonly,agreement readonly,model_agreement,group_agreement_readonly,1,0,0,0
access_agreement_allusers,agreement all users,model_agreement,group_agreement_user,1,1,1,0
access_agreement_manager,agreement manager,model_agreement,group_agreement_manager,1,1,1,1
access_agreement_recital_readonly,recital readonly,model_agreement_recital,group_agreement_readonly,1,0,0,0
access_agreement_recital_allusers,recital all users,model_agreement_recital,group_agreement_user,1,1,1,0
access_agreement_recital_manager,recital manager,model_agreement_recital,group_agreement_manager,1,1,1,1
access_agreement_section_readonly,section readonly,model_agreement_section,group_agreement_readonly,1,0,0,0
access_agreement_section_allusers,section all users,model_agreement_section,group_agreement_user,1,1,1,0
access_agreement_section_manager,section manager,model_agreement_section,group_agreement_manager,1,1,1,1
access_agreement_clause_readonly,clause readonly,model_agreement_clause,group_agreement_readonly,1,0,0,0
access_agreement_clause_allusers,clause all users,model_agreement_clause,group_agreement_user,1,1,1,0
access_agreement_clause_manager,clause manager,model_agreement_clause,group_agreement_manager,1,1,1,1
access_agreement_appendix_readonly,appendix readonly,model_agreement_appendix,group_agreement_readonly,1,0,0,0
access_agreement_appendix_allusers,appendix all users,model_agreement_appendix,group_agreement_user,1,1,1,0
access_agreement_appendix_manager,appendix manager,model_agreement_appendix,group_agreement_manager,1,1,1,1
access_agreement_line_readonly,agreement line readonly,model_agreement_line,group_agreement_readonly,1,0,0,0
access_agreement_line_allusers,agreement line all users,model_agreement_line,group_agreement_user,1,1,1,0
access_agreement_line_manager,agreement line manager,model_agreement_line,group_agreement_manager,1,1,1,1
access_agreement_stage_readonly,stage readonly,model_agreement_stage,group_agreement_readonly,1,0,0,0
access_agreement_stage_manager,stage manager,model_agreement_stage,group_agreement_manager,1,1,1,1
access_agreement_type_readonly,type readonly,model_agreement_type,group_agreement_readonly,1,0,0,0
access_agreement_type_manager,type manager,model_agreement_type,group_agreement_manager,1,1,1,1
access_agreement_subtype_readonly,subtype readonly,model_agreement_subtype,group_agreement_readonly,1,0,0,0
access_agreement_subtype_manager,subtype manager,model_agreement_subtype,group_agreement_manager,1,1,1,1
access_agreement_renewaltype_readonly,renewaltype readonly,model_agreement_renewaltype,group_agreement_readonly,1,0,0,0
access_agreement_renewaltype_manager,renewaltype manager,model_agreement_renewaltype,group_agreement_manager,1,1,1,1
access_agreement_increasetype_readonly,increasetype readonly,model_agreement_increasetype,group_agreement_readonly,1,0,0,0
access_agreement_increasetype_manager,increasetype manager,model_agreement_increasetype,group_agreement_manager,1,1,1,1

30
agreement_legal/security/res_groups.xml

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="module_agreement_legal_category" model="ir.module.category">
<field name ="name">Agreement</field>
<field name ="sequence">17</field>
</record>
<!-- Readonly group -->
<record id="group_agreement_readonly" model="res.groups">
<field name="name">Read-Only Users</field>
<field name="category_id" ref="module_agreement_legal_category"/>
<field name="implied_ids" eval="[(4, ref('base.group_user')), (4, ref('agreement.group_use_agreement_type')), (4, ref('agreement.group_use_agreement_template'))]"/>
</record>
<!-- User group -->
<record id="group_agreement_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="module_agreement_legal_category"/>
<field name="implied_ids" eval="[(4, ref('group_agreement_readonly'))]"/>
</record>
<!-- Manager group -->
<record id="group_agreement_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="module_agreement_legal_category"/>
<field name="implied_ids" eval="[(4, ref('group_agreement_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>
</odoo>

BIN
agreement_legal/static/description/icon.png

Before

Width: 64  |  Height: 64  |  Size: 6.6 KiB

481
agreement_legal/static/description/index.html

@ -1,481 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Agreements Legal</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="agreements-legal">
<h1 class="title">Agreements Legal</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/contract/tree/12.0/agreement_legal"><img alt="OCA/contract" src="https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-agreement_legal"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/110/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>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.</p>
<p>Based on the template, an agreement can be created and the pdf document generated.</p>
<p>The agreement would go through a workflow to finally become a contract with the
customer signature.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#configuration" id="id1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="id2">Usage</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id3">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id5">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id6">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="id8">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="id9">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#id1">Configuration</a></h1>
<p>To configure this module:</p>
<ul class="simple">
<li>Go to Agreement &gt; Configuration &gt; Templates</li>
<li>Create a new template with sections and clauses and their respective content</li>
<li>Go to Agreement &gt; Configuration &gt; Stages</li>
<li>Create and reorder stages to match your process</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id2">Usage</a></h1>
<p>To use this module:</p>
<ul class="simple">
<li>Go to Agreement &gt; Agreements</li>
<li>Create a new agreement</li>
<li>Select a template</li>
<li>Follow the process to get the required approval</li>
<li>Send the invitation to the customer to review and sign the agreement</li>
<li>Define Field using widget domain but having partial_use option true:</li>
<li>For Ex:</li>
<li>&lt;field name=”field_domain” widget=”domain” nolabel=”1”</li>
<li>options=”{‘model’: ‘agreement.recital’,</li>
<li>‘partial_use’: True}”/&gt;</li>
</ul>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id3">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>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)</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/contract/issues">GitHub Issues</a>.
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
<a class="reference external" href="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**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#id5">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#id6">Authors</a></h2>
<ul class="simple">
<li>Pavlov Media</li>
<li>Open Source Integrators</li>
<li>Yves Goldberg (Ygol Internetwork)</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#id7">Contributors</a></h2>
<ul class="simple">
<li>Patrick Wilson &lt;<a class="reference external" href="mailto:pwilson&#64;pavlovmedia.com">pwilson&#64;pavlovmedia.com</a>&gt;</li>
<li>Bhavesh Odedra &lt;<a class="reference external" href="mailto:bodedra&#64;opensourceintegrators.com">bodedra&#64;opensourceintegrators.com</a>&gt;</li>
<li>Wolfgang Hall &lt;<a class="reference external" href="mailto:whall&#64;opensourceintegrators.com">whall&#64;opensourceintegrators.com</a>&gt;</li>
<li>Maxime Chambreuil &lt;<a class="reference external" href="mailto:mchambreuil&#64;opensourceintegrators.com">mchambreuil&#64;opensourceintegrators.com</a>&gt;</li>
<li>Sandip Mangukiya &lt;<a class="reference external" href="mailto:smangukiya&#64;opensourceintegrators.com">smangukiya&#64;opensourceintegrators.com</a>&gt;</li>
<li>Yves Goldberg &lt;<a class="reference external" href="mailto:yves&#64;ygol.com">yves&#64;ygol.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#id8">Other credits</a></h2>
<p>The development of this module has been financially supported by:</p>
<ul class="simple">
<li>Pavlov Media</li>
<li>Open Source Integrators</li>
<li>Yves Goldberg</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#id9">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a> <a class="reference external" href="https://github.com/ygol"><img alt="ygol" src="https://github.com/ygol.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/contract/tree/12.0/agreement_legal">OCA/contract</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

80
agreement_legal/static/src/js/domain_widget_ext.js

@ -1,80 +0,0 @@
odoo.define('agreement_legal.domain_widget_ext', function (require) {
'use strict';
var basic_fields = require('web.basic_fields');
var DomainSelector = require('web.DomainSelector');
var session = require('web.session');
var core = require('web.core');
var qweb = core.qweb;
var _t = core._t;
basic_fields.FieldDomain.include({
/**
* Init
*/
init : function () {
this._super.apply(this, arguments);
// Add Additional options
this.partialUse = this.nodeOptions.partial_use || false;
},
//----------------------------------------------------------------------
// Private
//----------------------------------------------------------------------
/**
* @private
* @override _render from AbstractField
* @returns {Deferred}
*/
_render: function () {
// If there is no model, only change the non-domain-selector content
if (!this._domainModel) {
this._replaceContent();
return $.when();
}
// Convert char value to array value
var value = this.value || "[]";
// Create the domain selector or change the value of the current
// one...
var def;
if (!this.domainSelector) {
this.domainSelector = new DomainSelector(
this, this._domainModel, value, {
readonly: this.mode === "readonly" || this.inDialog,
filters: this.fsFilters,
debugMode: session.debug,
partialUse: this.partialUse || false,
});
def = this.domainSelector.prependTo(this.$el);
} else {
def = this.domainSelector.setDomain(value);
}
// ... then replace the other content (matched records, etc)
return def.then(this._replaceContent.bind(this));
},
/**
* Render the field DOM except for the domain selector part. The full
* field DOM is composed of a DIV which contains the domain selector
* widget, followed by other content. This other content is handled by
* this method.
*
* @private
*/
_replaceContent: function () {
if (this._$content) {
this._$content.remove();
}
this._$content = $(qweb.render("FieldDomain.content", {
hasModel: !!this._domainModel,
isValid: !!this._isValidForModel,
nbRecords: this.record.specialData[this.name].nbRecords || 0,
inDialogEdit: this.inDialog && this.mode === "edit",
partialUse: this.partialUse || false,
}));
this._$content.appendTo(this.$el);
},
});
});

179
agreement_legal/static/src/xml/domain_widget_view.xml

@ -1,179 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="FieldDomain.content">
<t t-if="partialUse">
<div t-if="hasModel" class="o_field_domain_panel">
<!--<div t-if="hasModel" class="o_field_domain_panel">
<i class="fa fa-arrow-right" role="img" aria-label="Domain" title="Domain"/>
<button t-if="isValid" class="btn btn-sm btn-secondary o_domain_show_selection_button" type="button">
<t t-esc="nbRecords"/> record(s)
</button>
<span t-else="" class="text-warning" role="alert"><i class="fa fa-exclamation-triangle" role="img" aria-label="Warning" title="Warning"/> Invalid domain</span>
<button t-if="inDialogEdit" class="btn btn-sm btn-primary o_field_domain_dialog_button">Edit Domain</button>
</div>
<div t-else="">Select a model to add a filter.</div>-->
</div>
</t>
<t t-if="!partialUse">
<div t-if="hasModel" class="o_field_domain_panel">
<i class="fa fa-arrow-right" role="img" aria-label="Domain" title="Domain"/>
<button t-if="isValid" class="btn btn-sm btn-secondary o_domain_show_selection_button" type="button">
<t t-esc="nbRecords"/> record(s)
</button>
<span t-else="" class="text-warning" role="alert"><i class="fa fa-exclamation-triangle" role="img" aria-label="Warning" title="Warning"/> Invalid domain</span>
<button t-if="inDialogEdit" class="btn btn-sm btn-primary o_field_domain_dialog_button">Edit Domain</button>
</div>
<div t-else="">Select a model to add a filter.</div>
</t>
</t>
<div aria-atomic="true" t-name="DomainSelector" t-attf-class="o_domain_node o_domain_tree o_domain_selector #{widget.readonly ? 'o_read_mode' : 'o_edit_mode'}">
<t t-if="widget.options.partialUse">
<t t-if="widget.children.length === 0">
<span>SMatch <strong>all records</strong></span>
<button t-if="!widget.readonly" class="btn btn-sm btn-primary o_domain_add_first_node_button"><i class="fa fa-plus"/> Add filter</button>
</t>
<t t-else="">
<div class="o_domain_tree_header">
<t t-if="widget.children.length === 1">Please navigate below and select field:</t>
<t t-else="">
<span>SSMatch records with</span>
<t t-call="DomainTree.OperatorSelector"/>
<span>of the following rules:</span>
</t>
</div>
<div class="o_domain_node_children_container"/>
</t>
</t>
<t t-if="!widget.options.partialUse">
<t t-if="widget.children.length === 0">
<span>Match <strong>all records</strong></span>
<button t-if="!widget.readonly" class="btn btn-sm btn-primary o_domain_add_first_node_button"><i class="fa fa-plus"/> Add filter</button>
</t>
<t t-else="">
<div class="o_domain_tree_header">
<t t-if="widget.children.length === 1">Match records with the following rule:</t>
<t t-else="">
<span>Match records with</span>
<t t-call="DomainTree.OperatorSelector"/>
<span>of the following rules:</span>
</t>
</div>
<div class="o_domain_node_children_container"/>
</t>
<label t-if="widget.debug &amp;&amp; !widget.readonly" class="o_domain_debug_container">
<span class="small"># Code editor</span>
<input type="text" class="o_domain_debug_input"/>
</label>
</t>
</div>
<t t-name="DomainNode.ControlPanel">
<t t-if="widget.options.partialUse">
<div t-if="!widget.readonly &amp;&amp; !widget.noControlPanel" class="o_domain_node_control_panel" role="toolbar" aria-label="Domain node">
</div>
</t>
<t t-if="!widget.options.partialUse">
<div t-if="!widget.readonly &amp;&amp; !widget.noControlPanel" class="o_domain_node_control_panel" role="toolbar" aria-label="Domain node">
<button class="btn o_domain_delete_node_button" title="Delete node" aria-label="Delete node"><i class="fa fa-times"/></button>
<button class="btn o_domain_add_node_button" title="Add node" aria-label="Add node"><i class="fa fa-plus-circle"/></button>
<button class="btn o_domain_add_node_button" title="Add branch" aria-label="Add branch" data-branch="1"><i class="fa fa-ellipsis-h"/></button>
</div>
</t>
</t>
<div t-name="DomainLeaf" t-attf-class="o_domain_node o_domain_leaf o_domain_selector_row #{widget.readonly ? 'o_read_mode' : 'o_edit_mode'}">
<t t-call="DomainNode.ControlPanel"/>
<div t-if="!widget.readonly" class="o_domain_leaf_edition">
<!-- field selector will be instantiated here -->
<t t-if="!widget.options.partialUse">
<div> <!-- used for flex stretching -->
<select class="o_domain_leaf_operator_select o_input">
<option t-foreach="widget.operators" t-as="key"
t-att-value="key"
t-att-selected="widget.displayOperator === key ? 'selected' : None">
<t t-esc="key_value"/>
</option>
</select>
</div>
<div t-attf-class="o_ds_value_cell#{_.contains(['set', 'not set'], widget.displayOperator) ? ' d-none' : ''}">
<t t-if="widget.selectionChoices !== null">
<select class="o_domain_leaf_value_input o_input">
<option t-foreach="widget.selectionChoices" t-as="val"
t-att-value="val[0]"
t-att-selected="_.contains(val, widget.displayValue) ? 'selected' : None">
<t t-esc="val[1]"/>
</option>
</select>
</t>
<t t-else="">
<t t-if="_.contains(['in', 'not in'], widget.operator)">
<div class="o_domain_leaf_value_input">
<span class="badge badge-pill" t-foreach="widget.displayValue" t-as="val">
<t t-esc="val"/> <i class="o_domain_leaf_value_remove_tag_button fa fa-times" t-att-data-value="val" role="img" aria-label="Remove tag" title="Remove tag"/>
</span>
</div>
<div class="o_domain_leaf_value_tags">
<input placeholder="Add new value" type="text" class="o_input"/>
<button class="btn btn-sm btn-primary fa fa-plus o_domain_leaf_value_add_tag_button" aria-label="Add tag" title="Add tag"/>
</div>
</t>
<t t-else="">
<input class="o_domain_leaf_value_input o_input" type="text" t-att-value="widget.displayValue"/>
</t>
</t>
</div>
</t>
</div>
<div t-else="" class="o_domain_leaf_info">
<!-- field selector will be instantiated here -->
<t t-if="_.isString(widget.value)">
<span class="o_domain_leaf_operator"><t t-esc="widget.operator_mapping[widget.operator]"/></span>
<span class="o_domain_leaf_value text-primary">"<t t-esc="widget.value"/>"</span>
</t>
<t t-if="_.isArray(widget.value)">
<span class="o_domain_leaf_operator"><t t-esc="widget.operator_mapping[widget.operator]"/></span>
<t t-foreach="widget.value" t-as="v">
<span class="o_domain_leaf_value text-primary">"<t t-esc="v"/>"</span>
<t t-if="!v_last"> or </t>
</t>
</t>
<t t-if="_.isNumber(widget.value)">
<span class="o_domain_leaf_operator"><t t-esc="widget.operator_mapping[widget.operator]"/></span>
<span class="o_domain_leaf_value text-primary"><t t-esc="widget.value"></t></span>
</t>
<t t-if="_.isBoolean(widget.value)">
is
<t t-if="widget.operator === '=' &amp;&amp; widget.value === false || widget.operator === '!=' &amp;&amp; widget.value === true">not</t>
set
</t>
</div>
</div>
<div aria-atomic="true" t-name="ModelFieldSelector" t-attf-class="o_field_selector#{!widget.options.readonly ? ' o_edit_mode o_input' : ''}">
<div class="o_field_selector_value" tabindex="0"/>
<t t-if="!widget.options.partialUse">
<div class="o_field_selector_controls" tabindex="0">
<i role="alert" class="fa fa-exclamation-triangle o_field_selector_warning d-none" title="Invalid field chain" aria-label="Invalid field chain"/>
</div>
</t>
<div t-if="!widget.options.readonly" class="o_field_selector_popover d-none" tabindex="0">
<div class="o_field_selector_popover_header text-center">
<i class="fa fa-arrow-left o_field_selector_popover_option o_field_selector_prev_page" title="Previous" role="img" aria-label="Previous"/>
<div class="o_field_selector_title"/>
<i class="fa fa-times o_field_selector_popover_option o_field_selector_close" title="Close" role="img" aria-label="Close"/>
</div>
<div class="o_field_selector_popover_body">
<ul class="o_field_selector_page"/>
</div>
<div t-if="widget.options.debugMode" class="o_field_selector_popover_footer">
<input type="text" class="o_input"/>
</div>
</div>
</div>
</templates>

372
agreement_legal/views/agreement.xml

@ -1,372 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_backend" name="agreement_legal assets"
inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript"
src="/agreement_legal/static/src/js/domain_widget_ext.js"/>
</xpath>
</template>
<!-- Agreement List View-->
<record model="ir.ui.view" id="partner_agreement_list_view">
<field name="name">Agreement List</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<tree string="Agreements" default_order='name'>
<field name="name"/>
<field name="partner_id"/>
<field name="company_id"/>
<field name="parent_agreement_id"/>
<field name="agreement_type_id"/>
<field name="agreement_subtype_id"/>
<field name="active" invisible="1"/>
</tree>
</field>
</record>
<!-- Agreement Form View -->
<record model="ir.ui.view" id="partner_agreement_form_view">
<field name="name">Agreement Form</field>
<field name="model">agreement</field>
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<form string="Agreement">
<header>
<button string="New Version" type="object" name="create_new_version" class="oe_highlight" attrs="{'invisible': [('state', '=', 'active')]}"/>
<button string="New Agreement" type="object" name="create_new_agreement" class="oe_highlight" attrs="{'invisible': [('is_template', '=', False)]}"/>
<field name="stage_id" widget="statusbar" clickable="True" options="{'fold_field': 'fold'}" domain="[('stage_type', '=', 'agreement')]"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Agreement Name"/>
<h1>
<field name="name"/>
</h1>
</div>
<group string="General">
<group>
<field name="code" readonly="1"/>
<field name="parent_agreement_id"
domain="[('partner_id', '=', partner_id)]"/>
<field name="is_template"/>
</group>
<group>
<field name="agreement_type_id"
widget="selection"
required="True"/>
<field name="agreement_subtype_id"
widget="selection"
domain="[('agreement_type_id', '=', agreement_type_id)]"/>
<field name="assigned_user_id"
attrs="{'invisible': [('is_template', '=', True)], 'readonly':[('is_template', '=', True)]}"/>
<field name="active" invisible="1"/>
<field name="state" invisible="1"/>
</group>
</group>
<group string="Description">
<field name="description"
required="True"
nolabel="1"/>
</group>
<group class="oe_edit_only">
<field name="field_domain" widget="domain" nolabel="1"
options="{'model': 'agreement',
'partial_use': True}" />
<group>
<field name="default_value"/>
<field name="copyvalue"/>
</group>
<p>
This section (on the left) allows you to add dynamic fields inside the description and special terms.
<ol>
<li>Select the agreement field using the popup</li>
<li>Enter the default value if the field is empty</li>
<li>Copy and paste the placeholder expression in the description or the special terms</li>
</ol>
</p>
</group>
<group name="parties" string="Parties">
<group name="cust_parties">
<field name="use_parties_content" string="Use custom content" />
</group>
<group name="cust_parties">
<p>
This section (on the left) allows you to replace the default listing of the parties with custom dynamic content.
</p>
</group>
<group name="partner"
string="Partner">
<div class="o_address_format">
<field name="partner_id"
domain="[('customer', '=', True)]"
context="{'show_address': 1}"
options="{&quot;always_reload&quot;: True}"/>
</div>
</group>
<group name="company"
string="Company">
<div class="o_address_format">
<field name="company_id"
readonly="1"
context="{'show_address': 1}"
options="{&quot;always_reload&quot;: True}"/>
</div>
</group>
<group name="partner_left" string="Primary Contact">
<field name="partner_contact_id" domain="[('parent_id', '=', partner_id)]" nolabel="1"/>
<field name="partner_contact_phone" widget="phone" readonly="1" nolabel="1"/>
<field name="partner_contact_email" widget="email" readonly="1" nolabel="1"/>
</group>
<group name="contact_right" string="Primary Contact">
<field name="company_contact_id" domain="[('parent_id', '=', company_id.partner_id)]" nolabel="1"/>
<field name="company_contact_phone" widget="phone" readonly="1" nolabel="1"/>
<field name="company_contact_email" widget="email" readonly="1" nolabel="1"/>
</group>
</group>
<group name="parties_content" string="Parties Content" attrs="{'invisible':[('use_parties_content', '=', False)]}">
<field name="parties" nolabel="1"/>
</group>
<group name="term_information">
<group name="termdates_left" string="Term Dates">
<field name="start_date" attrs="{'required': [('is_template', '=', False)], 'invisible': [('is_template', '=', True)]}"/>
<field name="end_date" attrs="{'required': [('is_template', '=', False)], 'invisible': [('is_template', '=', True)]}"/>
<field name="expiration_notice"/>
<field name="change_notice"/>
<field name="notification_address_id" domain="['|', ('parent_id', '=', partner_id), ('parent_id', '=', company_id.partner_id)]"/>
<field name="termination_requested"/>
<field name="termination_date"/>
</group>
</group>
<group string="Special Terms">
<field name="special_terms"
nolabel="1"/>
</group>
<notebook>
<page name="structure" string="Structure">
<div>
<button name="%(partner_agreement_contract_document_preview)d" string="Preview" type="action" class="oe_highlight"/>
<button name="%(partner_agreement_contract_document)d" string="Print" type="action" class="oe_highlight"/>
</div>
<separator string="Recitals"/>
<field name="recital_ids"
default_order="sequence"
nolabel="1"
context="{'default_agreement': active_id}"/>
<separator string="Sections"/>
<field name="sections_ids"
default_order='sequence'
nolabel="1"
context="{'default_agreement': active_id}"/>
<separator string="Clauses"/>
<field name="clauses_ids"
default_order='clause_id, sequence'
nolabel="1"
context="{'default_agreement': active_id}"/>
<separator string="Appendices"/>
<field name="appendix_ids"
default_order='sequence'
nolabel="1"
context="{'default_agreement': active_id}"/>
</page>
<page name="signature" string="Signatures">
<group>
<group string="Partner">
<field name="partner_signed_date"/>
<field name="partner_signed_user_id" domain="[('parent_id', '=', partner_id)]"/>
</group>
<group string="Company">
<field name="company_signed_date"/>
<field name="company_signed_user_id"/>
<field name="signed_contract" filename="signed_contract_filename"/>
<field name="signed_contract_filename" invisible="1"/>
</group>
</group>
</page>
<page name="products" string="Products/Services">
<field name="line_ids" nolabel="1">
<tree editable="top">
<field name="product_id"/>
<field name="name"/>
<field name="qty"/>
<field name="uom_id" groups="uom.group_uom"/>
</tree>
</field>
</page>
<page name="child_agreements" string="Child Agreements">
<field name="child_agreements_ids">
<tree default_order='version desc'>
<field name="name"/>
<field name="version"/>
<field name="revision"/>
</tree>
</field>
</page>
<page name="old_versions" string="Revisions">
<field name="previous_version_agreements_ids" string="Previouse Versions">
<tree default_order='version desc'>
<field name="name"/>
<field name="version"/>
<field name="revision"/>
</tree>
</field>
</page>
<page name="performance" string="Performance">
<p>This section is a place where financial records will show the current performance of this agreement.</p>
<p>Perhaps include invoices with total vs costs? </p>
</page>
</notebook>
<group string="Administration">
<div>
<p>Reviewed by <field name="reviewed_user_id" class="oe_inline"/> on <field name="reviewed_date" class="oe_inline"/>.</p>
<p>Approved by <field name="approved_user_id" class="oe_inline"/> on <field name="approved_date" class="oe_inline"/>.</p>
</div>
</group>
<footer>
Version: <field name="version" readonly="True"/>.<field name="revision" readonly="True"/>
| Created By: <field name="create_uid" readonly="True"/>
| Created On: <field name="create_date" readonly="True"/>
</footer>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<!-- Agreement Kanban View -->
<record id="view_project_agreement_kanban" model="ir.ui.view">
<field name="name">Agreement Kanban</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<kanban default_group_by="stage_id">
<field name="color"/>
<field name="assigned_user_id"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_kanban_content">
<div class="o_kanban_record_top">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title">
<field name="name"/>
</strong><br/>
<div class="o_kanban_record_subtitle text-muted">
<field name="partner_id" invisible="context.get('default_partner_id', False)"/>
<t t-if="record.end_date.raw_value and record.end_date.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
<div t-attf-class="#{red || ''}">
<i><field name="end_date"/></i>
</div>
</div>
</div>
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
<a role="button" class="dropdown-toggle btn" data-toggle="dropdown" href="#">
<span class="fa fa-ellipsis-v" aria-hidden="true"/>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<li t-if="widget.editable"><a type="edit">Edit</a></li>
<li class="divider"/>
<li class="dropdown-header">Record's Colour</li>
<li>
<ul class="oe_kanban_colorpicker" data-field="color"/>
</li>
</ul>
</div>
</div>
<div class="o_kanban_record_body">
<field name="agreement_type_id"/> - <field name="agreement_subtype_id"/>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left">
V: <field name="version"/>
</div>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.assigned_user_id.raw_value)" t-att-title="record.assigned_user_id.value" width="36" height="36" class="oe_kanban_avatar" alt="user &amp; picture"/>
</div>
</div>
</div>
<div class="oe_clear"/>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- Agreement Search View -->
<record model="ir.ui.view" id="partner_agreement_search_view">
<field name="name">Agreement Search</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<search string="Agreement Search">
<field name="name"/>
<field name="partner_id"/>
<field name="agreement_type_id"/>
<field name="agreement_subtype_id"/>
<filter name="filter_non_template" string="Non-Templates" domain="[('active','=',True),('is_template', '=', False)]"/>
<filter name="filter_inactive" string="Archived" domain="[('active','=',False)]"/>
<filter name="filter_templates" string="Templates" domain="[('active','=',True),('is_template', '=', True)]"/>
<filter name="group_partner_id" string="Partners" icon="terp-partner" context="{'group_by':'partner_id'}"/>
<filter name="group_status" string="Status" icon="terp-partner" context="{'group_by':'state'}"/>
</search>
</field>
</record>
<!-- Agreement Reporting -->
<record id="agreement_graph_view" model="ir.ui.view">
<field name="name">agreement.graph</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<graph string="Agreements" type="bar">
<field name="stage_id" type="row"/>
</graph>
</field>
</record>
<record id="agreement_pivot_view" model="ir.ui.view">
<field name="name">agreement.pivot</field>
<field name="model">agreement</field>
<field name="arch" type="xml">
<pivot string="Agreements" display_quantity="true">
<field name="stage_id" type="row"/>
</pivot>
</field>
</record>
<record id="action_agreement_report_order" model="ir.actions.act_window">
<field name="name">Agreements</field>
<field name="res_model">agreement</field>
<field name="view_type">form</field>
<field name="view_mode">graph,pivot</field>
</record>
<!-- actions opening views on models -->
<record model="ir.actions.act_window" id="agreement_dashboard_agreement">
<field name="name">Agreements</field>
<field name="res_model">agreement</field>
<field name="domain">[('is_template', '=', False)]</field>
<field name="view_mode">kanban,tree,form</field>
</record>
<record model="ir.actions.act_window" id="agreement_operations_agreement">
<field name="name">Agreements</field>
<field name="res_model">agreement</field>
<field name="domain">[('is_template', '=', False)]</field>
<field name="view_mode">tree,form</field>
</record>
<record model="ir.actions.act_window" id="partner_agreement_agreement_templates">
<field name="name">Templates</field>
<field name="res_model">agreement</field>
<field name="domain">[('is_template', '=', True)]</field>
<!-- <field name="context">[('is_template', '=', True)]</field> -->
<field name="view_mode">tree,kanban,form</field>
</record>
</odoo>

40
agreement_legal/views/agreement_type.xml

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Agreement Type List View-->
<record model="ir.ui.view" id="partner_agreement_type_list_view">
<field name="name">Agreement Type List</field>
<field name="model">agreement.type</field>
<field name="inherit_id" ref="agreement.agreement_type_list_view"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="agreement_subtypes_ids" string="Sub-Types"/>
</field>
</field>
</record>
<!-- Agreement Type Form View -->
<record model="ir.ui.view" id="partner_agreement_type_form_view">
<field name="name">Agreement Type Form</field>
<field name="model">agreement.type</field>
<field name="inherit_id" ref="agreement.agreement_type_form_view"/>
<field name="arch" type="xml">
<xpath expr="//sheet" position="inside">
<field name="agreement_subtypes_ids"
nolabel="1">
<tree editable="bottom">
<field name="name"/>
</tree>
</field>
</xpath>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="partner_agreement_action_type">
<field name="name">Agreement Types</field>
<field name="res_model">agreement.type</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>

131
agreement_legal_sale/README.rst

@ -1,131 +0,0 @@
====================
Agreement Legal Sale
====================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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_sale
: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_sale
: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|
Odoo Sales App does not support the management of legal content for agreements
and contracts. It's also not integrated with the Agreement App.
This module is for companies that needs their customer to sign an agreement
with all the legal information based on the selected agreement template.
**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 Sales
* Create or select a quotation
* Set the agreement template and add some products
* Confirm the quotation. An agreement is created and linked to the sales order:
* the agreement template is copied into an agreement with a copy of the
sections, clauses, recitals and appendices
* all the sales order lines are added as agreement lines
* the service products (with is_serviceprofile = True) on the SO are added as service profile on the agreement
* the customer information is set from the sales order
* the eventual analytic account linked to the sales order is set on the agreement
* the agreement is linked to the sales order and vice versa
Known issues / Roadmap
======================
The roadmap is documented on https://github.com/OCA/contract/issues.
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_sale%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
~~~~~~~
* Open Source Integrators
Contributors
~~~~~~~~~~~~
* Steven Campbell <scampbell@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
Other credits
~~~~~~~~~~~~~
The development of this module has been financially supported by:
* Pavlov Media
* Open Source Integrators
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-osi-scampbell| image:: https://github.com/osi-scampbell.png?size=40px
:target: https://github.com/osi-scampbell
:alt: osi-scampbell
.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px
:target: https://github.com/max3903
:alt: max3903
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-osi-scampbell| |maintainer-max3903|
This module is part of the `OCA/contract <https://github.com/OCA/contract/tree/12.0/agreement_legal_sale>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

3
agreement_legal_sale/__init__.py

@ -1,3 +0,0 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models

26
agreement_legal_sale/__manifest__.py

@ -1,26 +0,0 @@
# Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'Agreement Legal Sale',
'summary': 'Create an agreement when the sale order is confirmed',
'version': '12.0.1.1.0',
'license': 'AGPL-3',
'author': 'Open Source Integrators, Odoo Community Association (OCA)',
'category': 'Agreement',
'website': 'https://github.com/OCA/contract',
'depends': [
'agreement_legal',
'agreement_sale',
],
'data': [
'views/agreement.xml',
'views/sale_order.xml',
],
'installable': True,
'development_status': 'Beta',
'maintainers': [
'osi-scampbell',
'max3903',
],
}

55
agreement_legal_sale/i18n/agreement_legal_sale.pot

@ -1,55 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * agreement_legal_sale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: agreement_legal_sale
#: model:ir.model,name:agreement_legal_sale.model_agreement
msgid "Agreement"
msgstr ""
#. module: agreement_legal_sale
#: model:ir.model,name:agreement_legal_sale.model_agreement_line
msgid "Agreement Lines"
msgstr ""
#. module: agreement_legal_sale
#: model:ir.model.fields,field_description:agreement_legal_sale.field_sale_order__agreement_template_id
msgid "Agreement Template"
msgstr ""
#. module: agreement_legal_sale
#: model:ir.model.fields,field_description:agreement_legal_sale.field_agreement__analytic_account_id
msgid "Analytic Account"
msgstr ""
#. module: agreement_legal_sale
#: model:ir.model,name:agreement_legal_sale.model_sale_order
msgid "Sale Order"
msgstr ""
#. module: agreement_legal_sale
#: model_terms:ir.ui.view,arch_db:agreement_legal_sale.agreement_sale_form_view
msgid "Sales"
msgstr ""
#. module: agreement_legal_sale
#: model:ir.model.fields,field_description:agreement_legal_sale.field_agreement__sale_id
msgid "Sales Order"
msgstr ""
#. module: agreement_legal_sale
#: model:ir.model.fields,field_description:agreement_legal_sale.field_agreement_line__sale_line_id
msgid "Sales Order Line"
msgstr ""

76
agreement_legal_sale/i18n/de.po

@ -1,76 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * agreement_sale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-05-10 14:03+0000\n"
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
"Language-Team: none\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.5.1\n"
#. module: agreement_legal_sale
#: model:ir.model,name:agreement_legal_sale.model_agreement
msgid "Agreement"
msgstr "Vereinbarung"
#. module: agreement_legal_sale
#: model:ir.model,name:agreement_legal_sale.model_agreement_line
msgid "Agreement Lines"
msgstr "Vereinbarungspositionen"
#. module: agreement_legal_sale
#: model:ir.model.fields,field_description:agreement_legal_sale.field_sale_order__agreement_template_id
msgid "Agreement Template"
msgstr "Vereinbarungsvorlage"
#. module: agreement_legal_sale
#: model:ir.model.fields,field_description:agreement_legal_sale.field_agreement__analytic_account_id
msgid "Analytic Account"
msgstr "Kostenstelle"
#. module: agreement_legal_sale
#: model:ir.model,name:agreement_legal_sale.model_sale_order
msgid "Sale Order"
msgstr "Verkaufsauftrag"
#. module: agreement_legal_sale
#: model_terms:ir.ui.view,arch_db:agreement_legal_sale.agreement_sale_form_view
msgid "Sales"
msgstr "Verkauf"
#. module: agreement_legal_sale
#: model:ir.model.fields,field_description:agreement_legal_sale.field_agreement__sale_id
msgid "Sales Order"
msgstr "Verkaufsauftrag"
#. module: agreement_legal_sale
#: model:ir.model.fields,field_description:agreement_legal_sale.field_agreement_line__sale_line_id
msgid "Sales Order Line"
msgstr "Auftragszeile"
#~ msgid "Create a Service Profile"
#~ msgstr "Dienstleistungsprofil erstellen"
#~ msgid ""
#~ "If True, this product will create a service profile on the\n"
#~ " agreement when the sales order is confirmed."
#~ msgstr ""
#~ "Wenn der Haken gesetzt ist, wird dieses Produkt ein Dienstleistungsprofil "
#~ "in der Vereinbarung erzeugen, sobald der Verkaufsauftrag bestätigt wird."
#~ msgid "Product Template"
#~ msgstr "Produktvorlage"
#~ msgid "Quotation"
#~ msgstr "Angebot"
#~ msgid "agreement"
#~ msgstr "Vereinbarung"

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save