From a8314fbd2caa6900aee7127aa75200c0acc76e32 Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Sat, 31 Aug 2019 14:47:09 -0500 Subject: [PATCH 1/2] [IMP] agreement_serviceprofile --- agreement_serviceprofile/__init__.py | 3 +++ agreement_serviceprofile/__manifest__.py | 6 ++--- .../data/serviceprofile_stage.xml | 4 ++- .../models/agreement_serviceprofile.py | 5 +++- .../readme/CONTRIBUTORS.rst | 25 +++++++++++++------ agreement_serviceprofile/views/agreement.xml | 15 +++++++++-- .../views/agreement_serviceprofile.xml | 6 ++++- 7 files changed, 49 insertions(+), 15 deletions(-) diff --git a/agreement_serviceprofile/__init__.py b/agreement_serviceprofile/__init__.py index 0650744f..83c9c2d4 100644 --- a/agreement_serviceprofile/__init__.py +++ b/agreement_serviceprofile/__init__.py @@ -1 +1,4 @@ +# Copyright (C) 2018 Pavlov Media +# Copyright (C) 2019 Open Source Integrators +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models diff --git a/agreement_serviceprofile/__manifest__.py b/agreement_serviceprofile/__manifest__.py index 4e104fd5..7813d237 100644 --- a/agreement_serviceprofile/__manifest__.py +++ b/agreement_serviceprofile/__manifest__.py @@ -1,10 +1,10 @@ -# Copyright (C) 2018 - TODAY, Pavlov Media +# Copyright (C) 2018 Pavlov Media +# Copyright (C) 2019 Open Source Integrators # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - { 'name': 'Agreement Service Profile', 'summary': "Adds an Agreement Service Profile object", - 'version': '12.0.1.0.0', + 'version': '12.0.1.1.0', 'category': 'Contract', 'author': 'Pavlov Media, ' 'Open Source Integrators, ' diff --git a/agreement_serviceprofile/data/serviceprofile_stage.xml b/agreement_serviceprofile/data/serviceprofile_stage.xml index 584c47e5..7ee47763 100644 --- a/agreement_serviceprofile/data/serviceprofile_stage.xml +++ b/agreement_serviceprofile/data/serviceprofile_stage.xml @@ -1,4 +1,6 @@ - + diff --git a/agreement_serviceprofile/models/agreement_serviceprofile.py b/agreement_serviceprofile/models/agreement_serviceprofile.py index 3ec22e8d..75391948 100644 --- a/agreement_serviceprofile/models/agreement_serviceprofile.py +++ b/agreement_serviceprofile/models/agreement_serviceprofile.py @@ -26,7 +26,10 @@ class AgreementServiceProfile(models.Model): notes = fields.Text(string="Notes") product_id = fields.Many2one('product.template', 'Service', - domain="[('type', '=', 'service')]") + domain="[('type', '=', 'service')]", + required=True) + partner_id = fields.Many2one(related='agreement_id.partner_id', + string='Partner') # Used for Kanban grouped_by view @api.model diff --git a/agreement_serviceprofile/readme/CONTRIBUTORS.rst b/agreement_serviceprofile/readme/CONTRIBUTORS.rst index 4f31127a..8967a87d 100644 --- a/agreement_serviceprofile/readme/CONTRIBUTORS.rst +++ b/agreement_serviceprofile/readme/CONTRIBUTORS.rst @@ -1,7 +1,18 @@ -* Patrick Wilson -* Bhavesh Odedra -* Wolfgang Hall -* Maxime Chambreuil -* Sandip Mangukiya -* Serpent Consulting Services Pvt. Ltd. -* Brian McMaster +* `Pavlov Media `_: + + * Patrick Wilson + +* `Open Source Integrators `_: + + * Bhavesh Odedra + * Wolfgang Hall + * Maxime Chambreuil + * Sandip Mangukiya + +* `Serpent Consulting Services Pvt. Ltd. `_: + + * Murtuza Saleh + +* `Mc Master Lawn and Pest Services `_: + + * Brian McMaster diff --git a/agreement_serviceprofile/views/agreement.xml b/agreement_serviceprofile/views/agreement.xml index 6307dd7a..c7e605b8 100644 --- a/agreement_serviceprofile/views/agreement.xml +++ b/agreement_serviceprofile/views/agreement.xml @@ -11,10 +11,21 @@ +
- - + + + + + + + + + + + diff --git a/agreement_serviceprofile/views/agreement_serviceprofile.xml b/agreement_serviceprofile/views/agreement_serviceprofile.xml index e227240e..1c94c698 100644 --- a/agreement_serviceprofile/views/agreement_serviceprofile.xml +++ b/agreement_serviceprofile/views/agreement_serviceprofile.xml @@ -9,6 +9,7 @@ + @@ -87,7 +88,10 @@ + context="{'group_by': 'agreement_id'}"/> +
From 39e6ef673056ec8a5aa79a4276f03f40b65868aa Mon Sep 17 00:00:00 2001 From: Maxime Chambreuil Date: Tue, 3 Sep 2019 11:15:09 -0500 Subject: [PATCH 2/2] Update agreement_serviceprofile.py --- agreement_serviceprofile/models/agreement_serviceprofile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agreement_serviceprofile/models/agreement_serviceprofile.py b/agreement_serviceprofile/models/agreement_serviceprofile.py index 75391948..0e5ac452 100644 --- a/agreement_serviceprofile/models/agreement_serviceprofile.py +++ b/agreement_serviceprofile/models/agreement_serviceprofile.py @@ -25,7 +25,7 @@ class AgreementServiceProfile(models.Model): " without removing it.") notes = fields.Text(string="Notes") - product_id = fields.Many2one('product.template', 'Service', + product_id = fields.Many2one('product.template', 'Service Product', domain="[('type', '=', 'service')]", required=True) partner_id = fields.Many2one(related='agreement_id.partner_id',