Skip to content

Commit abdf2e0

Browse files
imlopesivantodorovich
authored andcommitted
[ADD] fieldservice_agreement_serviceprofile
This feature was a part of `fieldservice_agreement` up to 16.0, and extracted as a separate module during its migration to 17.0.
1 parent 694d8b9 commit abdf2e0

17 files changed

+771
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
==========================================
2+
Field Service - Agreements Service Profile
3+
==========================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:816250d8ffb8cfea7c4b4b6dba339375ea9264b6ff922a6c0d346939ffe04116
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github
20+
:target: https://github.com/OCA/field-service/tree/17.0/fieldservice_agreement_serviceprofile
21+
:alt: OCA/field-service
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/field-service-17-0/field-service-17-0-fieldservice_agreement_serviceprofile
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=17.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Glue module for Field Service Agreement and Service Profile
32+
33+
**Table of contents**
34+
35+
.. contents::
36+
:local:
37+
38+
Bug Tracker
39+
===========
40+
41+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/field-service/issues>`_.
42+
In case of trouble, please check there if your issue has already been reported.
43+
If you spotted it first, help us to smash it by providing a detailed and welcomed
44+
`feedback <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_agreement_serviceprofile%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
45+
46+
Do not contact contributors directly about support or help with technical issues.
47+
48+
Credits
49+
=======
50+
51+
Authors
52+
-------
53+
54+
* Open Source Integrators
55+
56+
Contributors
57+
------------
58+
59+
- Bhavesh Odedra <[email protected]>
60+
- Sandip Mangukiya <[email protected]>
61+
- Serpent Consulting Services Pvt. Ltd. <[email protected]>
62+
- Patrick Wilson <[email protected]>
63+
- Italo LOPES <[email protected]>
64+
65+
Other credits
66+
-------------
67+
68+
The development of this module has been financially supported by:
69+
70+
- Open Source Integrators
71+
72+
Maintainers
73+
-----------
74+
75+
This module is maintained by the OCA.
76+
77+
.. image:: https://odoo-community.org/logo.png
78+
:alt: Odoo Community Association
79+
:target: https://odoo-community.org
80+
81+
OCA, or the Odoo Community Association, is a nonprofit organization whose
82+
mission is to support the collaborative development of Odoo features and
83+
promote its widespread use.
84+
85+
.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px
86+
:target: https://github.com/max3903
87+
:alt: max3903
88+
.. |maintainer-bodedra| image:: https://github.com/bodedra.png?size=40px
89+
:target: https://github.com/bodedra
90+
:alt: bodedra
91+
.. |maintainer-smangukiya| image:: https://github.com/smangukiya.png?size=40px
92+
:target: https://github.com/smangukiya
93+
:alt: smangukiya
94+
.. |maintainer-osi-scampbell| image:: https://github.com/osi-scampbell.png?size=40px
95+
:target: https://github.com/osi-scampbell
96+
:alt: osi-scampbell
97+
.. |maintainer-patrickrwilson| image:: https://github.com/patrickrwilson.png?size=40px
98+
:target: https://github.com/patrickrwilson
99+
:alt: patrickrwilson
100+
101+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
102+
103+
|maintainer-max3903| |maintainer-bodedra| |maintainer-smangukiya| |maintainer-osi-scampbell| |maintainer-patrickrwilson|
104+
105+
This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/17.0/fieldservice_agreement_serviceprofile>`_ project on GitHub.
106+
107+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (C) 2018 - TODAY, Open Source Integrators
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from . import models
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (C) 2018 - TODAY, Open Source Integrators
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Field Service - Agreements Service Profile",
6+
"summary": "Manage Field Service agreements and contracts",
7+
"author": "Open Source Integrators, " "Odoo Community Association (OCA)",
8+
"website": "https://github.com/OCA/field-service",
9+
"category": "Field Service",
10+
"license": "AGPL-3",
11+
"version": "17.0.1.0.0",
12+
"depends": [
13+
"agreement_serviceprofile",
14+
"fieldservice_agreement",
15+
],
16+
"data": [
17+
"views/fsm_order_view.xml",
18+
"views/fsm_equipment_view.xml",
19+
"views/fsm_location.xml",
20+
],
21+
"installable": True,
22+
"development_status": "Beta",
23+
"maintainers": [
24+
"max3903",
25+
"bodedra",
26+
"smangukiya",
27+
"osi-scampbell",
28+
"patrickrwilson",
29+
],
30+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * fieldservice_agreement_serviceprofile
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 17.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
17+
#. module: fieldservice_agreement_serviceprofile
18+
#: model:ir.model.fields,field_description:fieldservice_agreement_serviceprofile.field_fsm_equipment__serviceprofile_id
19+
#: model:ir.model.fields,field_description:fieldservice_agreement_serviceprofile.field_fsm_order__serviceprofile_id
20+
#: model_terms:ir.ui.view,arch_db:fieldservice_agreement_serviceprofile.fsm_equipment_search_view_agreement
21+
#: model_terms:ir.ui.view,arch_db:fieldservice_agreement_serviceprofile.search_fsm_order_filter_agreement
22+
msgid "Service Profile"
23+
msgstr ""
24+
25+
#. module: fieldservice_agreement_serviceprofile
26+
#: model:ir.model.fields,field_description:fieldservice_agreement_serviceprofile.field_fsm_location__serviceprofile_ids
27+
#: model_terms:ir.ui.view,arch_db:fieldservice_agreement_serviceprofile.fsm_location_agreement_serviceprofile
28+
msgid "Service Profiles"
29+
msgstr ""
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
2+
3+
from . import fsm_equipment
4+
from . import fsm_location
5+
from . import fsm_order
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (C) 2018 - TODAY, Open Source Integrators
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from odoo import fields, models
5+
6+
7+
class FSMEquipment(models.Model):
8+
_inherit = "fsm.equipment"
9+
10+
serviceprofile_id = fields.Many2one("agreement.serviceprofile", "Service Profile")
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (C) 2018 - TODAY, Open Source Integrators
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from odoo import fields, models
5+
6+
7+
class FSMLocation(models.Model):
8+
_inherit = "fsm.location"
9+
10+
serviceprofile_ids = fields.Many2many(
11+
"agreement.serviceprofile",
12+
string="Service Profiles",
13+
compute="_compute_service_ids",
14+
)
15+
16+
def _compute_service_ids(self):
17+
for loc in self:
18+
agreements = self.env["agreement"].search(
19+
[("fsm_location_id", "=", loc.id)]
20+
)
21+
ids = []
22+
for agree in agreements:
23+
servpros = self.env["agreement.serviceprofile"].search(
24+
[("agreement_id", "=", agree.id)]
25+
)
26+
for ser in servpros:
27+
if ser.id not in ids:
28+
ids.append(ser.id)
29+
loc.serviceprofile_ids = ids
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (C) 2018 - TODAY, Open Source Integrators
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
4+
from odoo import fields, models
5+
6+
7+
class FSMOrder(models.Model):
8+
_inherit = "fsm.order"
9+
10+
serviceprofile_id = fields.Many2one("agreement.serviceprofile", "Service Profile")
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- Bhavesh Odedra \<<[email protected]>\>
2+
- Sandip Mangukiya \<<[email protected]>\>
3+
- Serpent Consulting Services Pvt. Ltd. \<<[email protected]>\>
4+
- Patrick Wilson \<<[email protected]>\>
5+
- Italo LOPES \<<[email protected]>\>

0 commit comments

Comments
 (0)