diff --git a/agreement_maintenance/README.rst b/agreement_maintenance/README.rst new file mode 100644 index 00000000..7de2499c --- /dev/null +++ b/agreement_maintenance/README.rst @@ -0,0 +1,114 @@ +====================== +Maintenance 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_maintenance + :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_maintenance + :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 maintenance agreements and contracts. + +**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 + +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..3fef7447 --- /dev/null +++ b/agreement_maintenance/__manifest__.py @@ -0,0 +1,24 @@ +# 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': 'Maintenance', + 'license': 'AGPL-3', + 'version': '11.0.0.0.1', + 'depends': [ + 'agreement', + 'maintenance', + ], + 'data': [ + 'views/agreement_view.xml', + 'views/maintenance_request_view.xml', + ], + 'development_status': 'Beta', + 'maintainers': ['max3903'], +} diff --git a/agreement_maintenance/i18n/agreement_maintenance.pot b/agreement_maintenance/i18n/agreement_maintenance.pot new file mode 100644 index 00000000..5362c535 --- /dev/null +++ b/agreement_maintenance/i18n/agreement_maintenance.pot @@ -0,0 +1,139 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * agreement_maintenance +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.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_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_agreement_id +msgid "Agreement" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.actions.act_window,name:agreement_maintenance.agreement_action_serviceprofile +msgid "Agreement Service Profile" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_create_uid +msgid "Created by" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_create_date +msgid "Created on" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_description +#: model:ir.ui.view,arch_db:agreement_maintenance.agreement_serviceprofile_form_view +msgid "Description" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_display_name +msgid "Display Name" +msgstr "" + +#. module: agreement_maintenance +#: selection:agreement.serviceprofile,profile_type:0 +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_equipment_id +msgid "Equipment" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_equipment_category_id +msgid "Equipment Category" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_id +msgid "ID" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_product_product_serviceprofile_ok +#: model:ir.model.fields,field_description:agreement_maintenance.field_product_template_serviceprofile_ok +msgid "Include on Service Profile" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile___last_update +msgid "Last Modified on" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_write_date +msgid "Last Updated on" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_name +#: model:ir.ui.view,arch_db:agreement_maintenance.agreement_serviceprofile_form_view +msgid "Name" +msgstr "" + +#. module: agreement_maintenance +#: selection:agreement.serviceprofile,profile_type:0 +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_product_id +msgid "Product" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model,name:agreement_maintenance.model_product_template +msgid "Product Template" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_profile_type +msgid "Profile Type" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_fsm_location_id +msgid "Service Location" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,field_description:agreement_maintenance.field_agreement_serviceprofile_ids +#: model:ir.ui.view,arch_db:agreement_maintenance.agreement_serviceprofile_form_view +msgid "Service Profile" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.ui.menu,name:agreement_maintenance.agreement_service_profiles +#: model:ir.ui.view,arch_db:agreement_maintenance.agreement_form_view +#: model:ir.ui.view,arch_db:agreement_maintenance.agreement_serviceprofile_list_view +msgid "Service Profiles" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model.fields,help:agreement_maintenance.field_product_product_serviceprofile_ok +#: model:ir.model.fields,help:agreement_maintenance.field_product_template_serviceprofile_ok +msgid "Specify if the product can be selected in a service profile line" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model,name:agreement_maintenance.model_agreement +msgid "agreement" +msgstr "" + +#. module: agreement_maintenance +#: model:ir.model,name:agreement_maintenance.model_agreement_serviceprofile +msgid "agreement.serviceprofile" +msgstr "" + diff --git a/agreement_maintenance/models/__init__.py b/agreement_maintenance/models/__init__.py new file mode 100644 index 00000000..bbfee333 --- /dev/null +++ b/agreement_maintenance/models/__init__.py @@ -0,0 +1,6 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import ( + agreement, + maintenance_request, +) diff --git a/agreement_maintenance/models/agreement.py b/agreement_maintenance/models/agreement.py new file mode 100644 index 00000000..5d7ea34d --- /dev/null +++ b/agreement_maintenance/models/agreement.py @@ -0,0 +1,21 @@ +# Copyright (C) 2018 - TODAY, Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class Agreement(models.Model): + _inherit = "agreement" + + mr_count = fields.Integer('# Maintenance Requests', + compute='_compute_mr_count') + + @api.multi + def _compute_mr_count(self): + data = self.env['maintenance.request'].read_group( + [('agreement_id', 'in', self.ids)], + ['agreement_id'], ['agreement_id']) + count_data = dict((item['agreement_id'][0], + item['agreement_id_count']) for item in data) + for agreement in self: + agreement.mr_count = count_data.get(agreement.id, 0) diff --git a/agreement_maintenance/models/maintenance_request.py b/agreement_maintenance/models/maintenance_request.py new file mode 100644 index 00000000..afc454a4 --- /dev/null +++ b/agreement_maintenance/models/maintenance_request.py @@ -0,0 +1,12 @@ +# 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 MaintenanceRequest(models.Model): + _inherit = "maintenance.request" + + agreement_id = fields.Many2one('agreement', 'Agreement') + serviceprofile_id = fields.Many2one('agreement.serviceprofile', + 'Service Profile') 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..b28609a5 --- /dev/null +++ b/agreement_maintenance/readme/USAGE.rst @@ -0,0 +1,10 @@ +To use this module: + +* Go to Maintenance +* Create or select a maintenance request +* Select the Agreement +* Select the Service Profile related to the select agreement +* Go to Agreement +* Open the previous agreement and click on the smart button + "Maintenance Requests" to see the list of related maintenance requests +* Group the requests by Service Profile 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/static/description/index.html b/agreement_maintenance/static/description/index.html new file mode 100644 index 00000000..023e5d22 --- /dev/null +++ b/agreement_maintenance/static/description/index.html @@ -0,0 +1,457 @@ + + + + + + +Maintenance Agreements + + + +
+

Maintenance Agreements

+ + +

Beta License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runbot

+

This module allows you to manage maintenance agreements and contracts.

+

Table of contents

+ +
+

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
  • +
+
+
+

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
  • +
+
+ +
+

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.

+Odoo Community Association +

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.

+

Current 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/views/agreement_view.xml b/agreement_maintenance/views/agreement_view.xml new file mode 100644 index 00000000..c4d28fc7 --- /dev/null +++ b/agreement_maintenance/views/agreement_view.xml @@ -0,0 +1,40 @@ + + + + + Maaintenance Requests + ir.actions.act_window + maintenance.request + form + tree,form + [('agreement_id', '=', active_id)] + +

+ Create Maintenance Requests +

+
+
+ + + agreement.form.maintenance.request + agreement + + + + + + + + +
diff --git a/agreement_maintenance/views/maintenance_request_view.xml b/agreement_maintenance/views/maintenance_request_view.xml new file mode 100644 index 00000000..57e87608 --- /dev/null +++ b/agreement_maintenance/views/maintenance_request_view.xml @@ -0,0 +1,32 @@ + + + + + maintenance.request.form.agreement + maintenance.request + + + + + + + + + + + + maintenance.request.select.agreement + maintenance.request + + + + + + + + +