diff --git a/agreement_maintenance/README.rst b/agreement_maintenance/README.rst new file mode 100644 index 00000000..6b72ce28 --- /dev/null +++ b/agreement_maintenance/README.rst @@ -0,0 +1,129 @@ +========== +Agreements +========== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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/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-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/11.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 > 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 `_. +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Pavlov Media +* Open Source Integrators + +Contributors +~~~~~~~~~~~~ + +* Patrick Wilson +* Bhavesh Odedra +* Wolfgang Hall +* Maxime Chambreuil + +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-max3903| image:: https://github.com/max3903.png?size=40px + :target: https://github.com/max3903 + :alt: max3903 + +Current `maintainer `__: + +|maintainer-max3903| + +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_maintenance/__init__.py b/agreement_maintenance/__init__.py new file mode 100644 index 00000000..073035d1 --- /dev/null +++ b/agreement_maintenance/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2018 - TODAY, Pavlov Media +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/agreement_maintenance/__manifest__.py b/agreement_maintenance/__manifest__.py new file mode 100644 index 00000000..9e06b6e8 --- /dev/null +++ b/agreement_maintenance/__manifest__.py @@ -0,0 +1,29 @@ +# Copyright (C) 2018 - TODAY, Pavlov Media +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Maintenance Agreements', + 'summary': 'Manage maintenance agreements and contracts', + 'author': 'Pavlov Media, ' + 'Open Source Integrators, ' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/contract', + 'category': 'Partner', + 'license': 'AGPL-3', + 'version': '11.0.0.0.1', + 'depends': [ + 'agreement', + 'maintenance', + 'fieldservice', + ], + 'data': [ + 'security/ir.model.access.csv', + 'views/agreement.xml', + 'views/agreement_serviceprofile.xml', + 'views/product.xml', + 'views/menu.xml', + ], + 'application': False, + 'development_status': 'Beta', + 'maintainers': ['max3903'], +} diff --git a/agreement_maintenance/models/__init__.py b/agreement_maintenance/models/__init__.py new file mode 100644 index 00000000..e8d8eb66 --- /dev/null +++ b/agreement_maintenance/models/__init__.py @@ -0,0 +1,7 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import ( + agreement, + product_template, + agreement_serviceprofile, +) diff --git a/agreement_maintenance/models/agreement.py b/agreement_maintenance/models/agreement.py new file mode 100644 index 00000000..4c77838d --- /dev/null +++ b/agreement_maintenance/models/agreement.py @@ -0,0 +1,15 @@ +# Copyright (C) 2018 - TODAY, Pavlov Media +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class Agreement(models.Model): + _inherit = 'agreement' + + serviceprofile_ids = fields.One2many( + 'agreement.serviceprofile', + 'agreement_id', + string="Service Profile", + copy=True + ) diff --git a/agreement_maintenance/models/agreement_serviceprofile.py b/agreement_maintenance/models/agreement_serviceprofile.py new file mode 100644 index 00000000..99c6adf0 --- /dev/null +++ b/agreement_maintenance/models/agreement_serviceprofile.py @@ -0,0 +1,40 @@ +# Copyright (C) 2018 - TODAY, Pavlov Media +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +PROFILE_TYPE = [ + ('equipment', 'Equipment'), + ('product', 'Product') +] + + +class AgreementServiceProfile(models.Model): + _name = 'agreement.serviceprofile' + + name = fields.Char(string="Name", required=True) + profile_type = fields.Selection( + PROFILE_TYPE, + string="Profile Type") + description = fields.Text(string="Description") + equipment_id = fields.Many2one( + 'maintenance.equipment', + string="Equipment") + product_id = fields.Many2one( + 'product.product', + string="Product", + domain=[('serviceprofile_ok', '=', True)]) + equipment_category_id = fields.Many2one( + 'maintenance.equipment.category', + related='equipment_id.category_id', + string="Equipment Category", + readonly=1) + agreement_id = fields.Many2one( + 'agreement', + string="Agreement", + ondelete="cascade", + required=True) + fsm_location_id = fields.Many2one( + 'fsm.location', + string="Service Location") diff --git a/agreement_maintenance/models/product_template.py b/agreement_maintenance/models/product_template.py new file mode 100644 index 00000000..51de3a2b --- /dev/null +++ b/agreement_maintenance/models/product_template.py @@ -0,0 +1,14 @@ +# 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' + + serviceprofile_ok = fields.Boolean( + string='Include on Service Profile', + default=False, + help="Specify if the product can be selected in a service profile line" + ) diff --git a/agreement_maintenance/readme/CONFIGURE.rst b/agreement_maintenance/readme/CONFIGURE.rst new file mode 100644 index 00000000..3871fc34 --- /dev/null +++ b/agreement_maintenance/readme/CONFIGURE.rst @@ -0,0 +1,6 @@ +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 diff --git a/agreement_maintenance/readme/CONTRIBUTORS.rst b/agreement_maintenance/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..4e2eb061 --- /dev/null +++ b/agreement_maintenance/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Patrick Wilson +* Bhavesh Odedra +* Wolfgang Hall +* Maxime Chambreuil diff --git a/agreement_maintenance/readme/CREDITS.rst b/agreement_maintenance/readme/CREDITS.rst new file mode 100644 index 00000000..0543afe7 --- /dev/null +++ b/agreement_maintenance/readme/CREDITS.rst @@ -0,0 +1,4 @@ +The development of this module has been financially supported by: + +* Pavlov Media +* Open Source Integrators diff --git a/agreement_maintenance/readme/DESCRIPTION.rst b/agreement_maintenance/readme/DESCRIPTION.rst new file mode 100644 index 00000000..020bfcbb --- /dev/null +++ b/agreement_maintenance/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module allows you to manage maintenance agreements and contracts. diff --git a/agreement_maintenance/readme/USAGE.rst b/agreement_maintenance/readme/USAGE.rst new file mode 100644 index 00000000..0eb52e5a --- /dev/null +++ b/agreement_maintenance/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 diff --git a/agreement_maintenance/security/ir.model.access.csv b/agreement_maintenance/security/ir.model.access.csv new file mode 100644 index 00000000..8e45456f --- /dev/null +++ b/agreement_maintenance/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_agreement_serviceprofile_allusers,serviceprofile all users,model_agreement_serviceprofile,agreement.group_agreement_user,1,0,0,0 +access_agreement_serviceprofile_manager,serviceprofile manager,model_agreement_serviceprofile,agreement.group_agreement_manager,1,1,1,1 diff --git a/agreement_maintenance/static/description/icon.png b/agreement_maintenance/static/description/icon.png new file mode 100644 index 00000000..23ce9313 Binary files /dev/null and b/agreement_maintenance/static/description/icon.png differ diff --git a/agreement_maintenance/views/agreement.xml b/agreement_maintenance/views/agreement.xml new file mode 100644 index 00000000..eefa92a9 --- /dev/null +++ b/agreement_maintenance/views/agreement.xml @@ -0,0 +1,27 @@ + + + + + + Agreement Form + agreement + + + + + + + + + + + + + + + + + + + diff --git a/agreement_maintenance/views/agreement_serviceprofile.xml b/agreement_maintenance/views/agreement_serviceprofile.xml new file mode 100644 index 00000000..b0339c21 --- /dev/null +++ b/agreement_maintenance/views/agreement_serviceprofile.xml @@ -0,0 +1,63 @@ + + + + + + Agreement Service Profile List + agreement.serviceprofile + + + + + + + + + + + + + + + Agreement Service Profile Form + agreement.serviceprofile + +
+ +
+

+ +

+
+ + + + + + + + + + + + + + +
+
+
+
+ + + + Agreement Service Profile + agreement.serviceprofile + tree,form + + +
diff --git a/agreement_maintenance/views/menu.xml b/agreement_maintenance/views/menu.xml new file mode 100644 index 00000000..acf8af5f --- /dev/null +++ b/agreement_maintenance/views/menu.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/agreement_maintenance/views/product.xml b/agreement_maintenance/views/product.xml new file mode 100644 index 00000000..4c2be246 --- /dev/null +++ b/agreement_maintenance/views/product.xml @@ -0,0 +1,17 @@ + + + + + product.template.common.serviceprofile.ok.form + product.template + + +
+
+ +
+
+
+
+