diff --git a/agreement_sale/README.rst b/agreement_legal_sale/README.rst
similarity index 91%
rename from agreement_sale/README.rst
rename to agreement_legal_sale/README.rst
index 3dff350e..34babcb4 100644
--- a/agreement_sale/README.rst
+++ b/agreement_legal_sale/README.rst
@@ -1,6 +1,6 @@
-================
-Agreement - Sale
-================
+====================
+Agreement Legal Sale
+====================
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
@@ -14,13 +14,13 @@ Agreement - Sale
: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/11.0/agreement_sale
+ :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-11-0/contract-11-0-agreement_sale
+ :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/11.0
+ :target: https://runbot.odoo-community.org/runbot/110/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -92,6 +92,7 @@ Contributors
* Steven Campbell
* Maxime Chambreuil
+* Serpent Consulting Services Pvt. Ltd.
Other credits
~~~~~~~~~~~~~
@@ -125,6 +126,6 @@ Current `maintainers `__:
|maintainer-osi-scampbell| |maintainer-max3903|
-This module is part of the `OCA/contract `_ project on GitHub.
+This module is part of the `OCA/contract `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/agreement_sale/__init__.py b/agreement_legal_sale/__init__.py
similarity index 61%
rename from agreement_sale/__init__.py
rename to agreement_legal_sale/__init__.py
index b634044c..69f7babd 100644
--- a/agreement_sale/__init__.py
+++ b/agreement_legal_sale/__init__.py
@@ -1,4 +1,3 @@
-# Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
diff --git a/agreement_sale/__manifest__.py b/agreement_legal_sale/__manifest__.py
similarity index 75%
rename from agreement_sale/__manifest__.py
rename to agreement_legal_sale/__manifest__.py
index d72ef59e..7ed16142 100644
--- a/agreement_sale/__manifest__.py
+++ b/agreement_legal_sale/__manifest__.py
@@ -2,16 +2,16 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
- 'name': 'Agreement - Sale',
- 'summary': 'Create an agreement when the sales order is confirmed',
- 'version': '11.0.0.0.1',
+ 'name': 'Agreement Legal Sale',
+ 'summary': 'Create an agreement when the sale order is confirmed',
+ 'version': '12.0.1.0.0',
'license': 'AGPL-3',
'author': 'Open Source Integrators, Odoo Community Association (OCA)',
'category': 'Agreement',
'website': 'https://github.com/OCA/contract',
'depends': [
- 'agreement',
- 'sale',
+ 'agreement_legal',
+ 'agreement_sale',
],
'data': [
'views/agreement.xml',
diff --git a/agreement_sale/i18n/agreement_sale.pot b/agreement_legal_sale/i18n/agreement_sale.pot
similarity index 100%
rename from agreement_sale/i18n/agreement_sale.pot
rename to agreement_legal_sale/i18n/agreement_sale.pot
diff --git a/agreement_sale/i18n/de.po b/agreement_legal_sale/i18n/de.po
similarity index 100%
rename from agreement_sale/i18n/de.po
rename to agreement_legal_sale/i18n/de.po
diff --git a/agreement_sale/models/__init__.py b/agreement_legal_sale/models/__init__.py
similarity index 70%
rename from agreement_sale/models/__init__.py
rename to agreement_legal_sale/models/__init__.py
index f136a926..2f3b40d7 100644
--- a/agreement_sale/models/__init__.py
+++ b/agreement_legal_sale/models/__init__.py
@@ -1,4 +1,3 @@
-# Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import (
diff --git a/agreement_legal_sale/models/agreement.py b/agreement_legal_sale/models/agreement.py
new file mode 100644
index 00000000..6e064886
--- /dev/null
+++ b/agreement_legal_sale/models/agreement.py
@@ -0,0 +1,20 @@
+# Copyright (C) 2019 - TODAY, Open Source Integrators
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import fields, models
+
+
+class Agreement(models.Model):
+ _inherit = 'agreement'
+
+ sale_id = fields.Many2one('sale.order', string='Sales Order')
+ analytic_account_id = fields.Many2one(
+ 'account.analytic.account', 'Analytic Account', readonly=True,
+ copy=False)
+
+
+class AgreementLine(models.Model):
+ _inherit = "agreement.line"
+
+ sale_line_id = fields.Many2one('sale.order.line',
+ string='Sales Order Line')
diff --git a/agreement_sale/models/product.py b/agreement_legal_sale/models/product.py
similarity index 100%
rename from agreement_sale/models/product.py
rename to agreement_legal_sale/models/product.py
diff --git a/agreement_sale/models/sale_order.py b/agreement_legal_sale/models/sale_order.py
similarity index 85%
rename from agreement_sale/models/sale_order.py
rename to agreement_legal_sale/models/sale_order.py
index 34490442..a6713a61 100644
--- a/agreement_sale/models/sale_order.py
+++ b/agreement_legal_sale/models/sale_order.py
@@ -11,7 +11,6 @@ class SaleOrder(models.Model):
'agreement',
string="Agreement Template",
domain="[('is_template', '=', True)]")
- agreement_id = fields.Many2one('agreement', string="Agreement", copy=False)
@api.multi
def _action_confirm(self):
@@ -20,14 +19,14 @@ class SaleOrder(models.Model):
if order.agreement_template_id:
order.agreement_id = order.agreement_template_id.copy(default={
'name': order.name,
+ 'code': order.name,
'is_template': False,
'sale_id': order.id,
'partner_id': order.partner_id.id,
- 'analytic_account_id':
- order.analytic_account_id and
- order.analytic_account_id.id or False,
+ 'analytic_account_id': order.analytic_account_id and
+ order.analytic_account_id.id or False,
})
- for line in self.order_line:
+ for line in order.order_line:
# Create agreement line
self.env['agreement.line'].create({
'product_id': line.product_id.id,
diff --git a/agreement_sale/readme/CONFIGURE.rst b/agreement_legal_sale/readme/CONFIGURE.rst
similarity index 100%
rename from agreement_sale/readme/CONFIGURE.rst
rename to agreement_legal_sale/readme/CONFIGURE.rst
diff --git a/agreement_sale/readme/CONTRIBUTORS.rst b/agreement_legal_sale/readme/CONTRIBUTORS.rst
similarity index 64%
rename from agreement_sale/readme/CONTRIBUTORS.rst
rename to agreement_legal_sale/readme/CONTRIBUTORS.rst
index db3894ee..364a1729 100644
--- a/agreement_sale/readme/CONTRIBUTORS.rst
+++ b/agreement_legal_sale/readme/CONTRIBUTORS.rst
@@ -1,2 +1,3 @@
* Steven Campbell
* Maxime Chambreuil
+* Serpent Consulting Services Pvt. Ltd.
diff --git a/agreement_sale/readme/CREDITS.rst b/agreement_legal_sale/readme/CREDITS.rst
similarity index 100%
rename from agreement_sale/readme/CREDITS.rst
rename to agreement_legal_sale/readme/CREDITS.rst
diff --git a/agreement_sale/readme/DESCRIPTION.rst b/agreement_legal_sale/readme/DESCRIPTION.rst
similarity index 100%
rename from agreement_sale/readme/DESCRIPTION.rst
rename to agreement_legal_sale/readme/DESCRIPTION.rst
diff --git a/agreement_sale/readme/ROADMAP.rst b/agreement_legal_sale/readme/ROADMAP.rst
similarity index 100%
rename from agreement_sale/readme/ROADMAP.rst
rename to agreement_legal_sale/readme/ROADMAP.rst
diff --git a/agreement_sale/readme/USAGE.rst b/agreement_legal_sale/readme/USAGE.rst
similarity index 100%
rename from agreement_sale/readme/USAGE.rst
rename to agreement_legal_sale/readme/USAGE.rst
diff --git a/agreement_sale/static/description/icon.png b/agreement_legal_sale/static/description/icon.png
similarity index 100%
rename from agreement_sale/static/description/icon.png
rename to agreement_legal_sale/static/description/icon.png
diff --git a/agreement_sale/static/description/index.html b/agreement_legal_sale/static/description/index.html
similarity index 93%
rename from agreement_sale/static/description/index.html
rename to agreement_legal_sale/static/description/index.html
index 031943a8..d1347a99 100644
--- a/agreement_sale/static/description/index.html
+++ b/agreement_legal_sale/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
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
@@ -426,7 +426,7 @@ sections, clauses, recitals and appendices
Bugs are tracked on GitHub 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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
diff --git a/agreement_sale/views/agreement.xml b/agreement_legal_sale/views/agreement.xml
similarity index 64%
rename from agreement_sale/views/agreement.xml
rename to agreement_legal_sale/views/agreement.xml
index cb73ad6b..dffaee97 100644
--- a/agreement_sale/views/agreement.xml
+++ b/agreement_legal_sale/views/agreement.xml
@@ -1,4 +1,4 @@
-
+
@@ -7,19 +7,23 @@
agreement.form.view
agreement
-
+
-
+
+
-
+
+
+
diff --git a/agreement_sale/views/product.xml b/agreement_legal_sale/views/product.xml
similarity index 84%
rename from agreement_sale/views/product.xml
rename to agreement_legal_sale/views/product.xml
index fbab53e8..54fa92cb 100644
--- a/agreement_sale/views/product.xml
+++ b/agreement_legal_sale/views/product.xml
@@ -1,4 +1,4 @@
-
+
@@ -12,10 +12,10 @@
-
+
-
+
diff --git a/agreement_sale/views/sale_order.xml b/agreement_legal_sale/views/sale_order.xml
similarity index 95%
rename from agreement_sale/views/sale_order.xml
rename to agreement_legal_sale/views/sale_order.xml
index eedba901..8b607a89 100644
--- a/agreement_sale/views/sale_order.xml
+++ b/agreement_legal_sale/views/sale_order.xml
@@ -1,4 +1,4 @@
-
+
diff --git a/agreement_sale/models/agreement.py b/agreement_sale/models/agreement.py
deleted file mode 100644
index 85095c56..00000000
--- a/agreement_sale/models/agreement.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (C) 2019 - TODAY, Open Source Integrators
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-
-from odoo import fields, models
-
-
-class Agreement(models.Model):
- _inherit = 'agreement'
-
- sale_id = fields.Many2one('sale.order', string='Sales Order')