Skip to content

Commit

Permalink
[13.0] revert forward port
Browse files Browse the repository at this point in the history
Revert "[13.0] fwd "
  • Loading branch information
RLeeOSI authored Nov 11, 2020
2 parents 1c9cb51 + b62ed33 commit 00dbb4d
Show file tree
Hide file tree
Showing 81 changed files with 57 additions and 3,311 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ addons:
apt:
packages:
- expect-dev # provides unbuffer utility
- postgis postgresql-9.6-postgis-2.3
- postgresql-9.6-postgis-2.3-scripts

stages:
- linting
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ addon | version | summary
--- | --- | ---
[base_territory](base_territory/) | 13.0.1.0.0 | This module allows you to define territories, branches, districts and regions to be used for Field Service operations or Sales.
[fieldservice](fieldservice/) | 13.0.1.0.0 | Manage Field Service Locations, Workers and Orders
[fieldservice_activity](fieldservice_activity/) | 13.0.1.0.0 | Field Service Activities are a set of actions that need to be performed on a service order
[fieldservice_crm](fieldservice_crm/) | 13.0.1.0.0 | Create Field Service orders from the CRM
[fieldservice_geoengine](fieldservice_geoengine/) | 13.0.1.0.0 | Display Field Service locations on a map with Open Street Map
[fieldservice_recurring](fieldservice_recurring/) | 13.0.1.0.1 | Manage recurring Field Service orders
[fieldservice_vehicle](fieldservice_vehicle/) | 13.0.1.0.0 | Manage Field Service vehicles and assign drivers

Expand Down
3 changes: 2 additions & 1 deletion fieldservice/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copyright (C) 2018 Open Source Integrators
# Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Field Service",
"summary": "Manage Field Service Locations, Workers and Orders",
Expand Down
12 changes: 0 additions & 12 deletions fieldservice/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -1942,12 +1942,6 @@ msgstr ""
msgid "Opportunities"
msgstr "# Verkaufschancen"

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Opportunities Count"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count
#, fuzzy
Expand Down Expand Up @@ -2594,12 +2588,6 @@ msgstr ""
msgid "Teams"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,help:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,help:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Technical field used for stat button"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_order__template_id
msgid "Template"
Expand Down
12 changes: 0 additions & 12 deletions fieldservice/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -1973,12 +1973,6 @@ msgstr "Operaciones"
msgid "Opportunities"
msgstr "Oportunidades"

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Opportunities Count"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count
msgid "Opportunity"
Expand Down Expand Up @@ -2633,12 +2627,6 @@ msgstr "¡Nombre de equipo ya existe!"
msgid "Teams"
msgstr "Equipos"

#. module: fieldservice
#: model:ir.model.fields,help:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,help:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Technical field used for stat button"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_order__template_id
msgid "Template"
Expand Down
22 changes: 5 additions & 17 deletions fieldservice/i18n/es_AR.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-10-25 00:08+0000\n"
"PO-Revision-Date: 2020-08-07 01:59+0000\n"
"Last-Translator: Ignacio Buioli <ibuioli@gmail.com>\n"
"Language-Team: none\n"
"Language: es_AR\n"
Expand Down Expand Up @@ -714,7 +714,7 @@ msgstr "Creado por"
#: model:ir.model.fields,field_description:fieldservice.field_fsm_template__create_date
#: model:ir.model.fields,field_description:fieldservice.field_fsm_wizard__create_date
msgid "Created on"
msgstr "Creado el"
msgstr "Creado en"

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_location__credit_limit
Expand Down Expand Up @@ -997,7 +997,7 @@ msgstr "Pedido de Servicio de Campo"
#. module: fieldservice
#: model:ir.model,name:fieldservice.model_fsm_template
msgid "Field Service Order Template"
msgstr "Plantilla del Pedido de Servicio de Campo"
msgstr "Plantilla de Pedido de Servicio de Campo"

#. module: fieldservice
#: model:ir.model,name:fieldservice.model_fsm_order_type
Expand Down Expand Up @@ -1379,7 +1379,7 @@ msgstr "Idioma"
#: model:ir.model.fields,field_description:fieldservice.field_fsm_template____last_update
#: model:ir.model.fields,field_description:fieldservice.field_fsm_wizard____last_update
msgid "Last Modified on"
msgstr "??ltima Modificaci??n el"
msgstr "Última Modificación en"

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_category__write_uid
Expand Down Expand Up @@ -1969,12 +1969,6 @@ msgstr "Operaciones"
msgid "Opportunities"
msgstr "Oportunidades"

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Opportunities Count"
msgstr "Cuenta de Oportunidades"

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count
msgid "Opportunity"
Expand Down Expand Up @@ -2626,12 +2620,6 @@ msgstr "¡El nombre del Equipo ya existe!"
msgid "Teams"
msgstr "Equipos"

#. module: fieldservice
#: model:ir.model.fields,help:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,help:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Technical field used for stat button"
msgstr "Campo técnico utilizado para el botón de estadísticas"

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_order__template_id
msgid "Template"
Expand Down Expand Up @@ -2737,7 +2725,7 @@ msgstr "Para Asignar"
#: model_terms:ir.ui.view,arch_db:fieldservice.fsm_order_search_view
#: model_terms:ir.ui.view,arch_db:fieldservice.view_team_kanban
msgid "To Do"
msgstr "Por Hacer"
msgstr "Para Hacer"

#. module: fieldservice
#: model_terms:ir.ui.view,arch_db:fieldservice.view_team_kanban
Expand Down
12 changes: 0 additions & 12 deletions fieldservice/i18n/es_CL.po
Original file line number Diff line number Diff line change
Expand Up @@ -1973,12 +1973,6 @@ msgstr "Operaciones"
msgid "Opportunities"
msgstr "Oportunidades"

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Opportunities Count"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count
msgid "Opportunity"
Expand Down Expand Up @@ -2633,12 +2627,6 @@ msgstr "¡Nombre de equipo ya existe!"
msgid "Teams"
msgstr "Equipos"

#. module: fieldservice
#: model:ir.model.fields,help:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,help:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Technical field used for stat button"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_order__template_id
msgid "Template"
Expand Down
12 changes: 0 additions & 12 deletions fieldservice/i18n/fieldservice.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1930,12 +1930,6 @@ msgstr ""
msgid "Opportunities"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Opportunities Count"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count
msgid "Opportunity"
Expand Down Expand Up @@ -2581,12 +2575,6 @@ msgstr ""
msgid "Teams"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,help:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,help:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Technical field used for stat button"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_order__template_id
msgid "Template"
Expand Down
12 changes: 0 additions & 12 deletions fieldservice/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -1929,12 +1929,6 @@ msgstr ""
msgid "Opportunities"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Opportunities Count"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count
msgid "Opportunity"
Expand Down Expand Up @@ -2580,12 +2574,6 @@ msgstr ""
msgid "Teams"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,help:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,help:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Technical field used for stat button"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_order__template_id
msgid "Template"
Expand Down
12 changes: 0 additions & 12 deletions fieldservice/i18n/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -1965,12 +1965,6 @@ msgstr "Operações"
msgid "Opportunities"
msgstr "Oportunidades"

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Opportunities Count"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_person__opportunity_count
msgid "Opportunity"
Expand Down Expand Up @@ -2623,12 +2617,6 @@ msgstr "O nome da equipe já existe!"
msgid "Teams"
msgstr "Equipes"

#. module: fieldservice
#: model:ir.model.fields,help:fieldservice.field_fsm_location__opportunity_count_ids
#: model:ir.model.fields,help:fieldservice.field_fsm_person__opportunity_count_ids
msgid "Technical field used for stat button"
msgstr ""

#. module: fieldservice
#: model:ir.model.fields,field_description:fieldservice.field_fsm_order__template_id
msgid "Template"
Expand Down
1 change: 0 additions & 1 deletion fieldservice/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@
fsm_equipment,
fsm_order,
fsm_order_type,
fsm_person_calendar_filter,
)
5 changes: 4 additions & 1 deletion fieldservice/models/fsm_equipment.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class FSMEquipment(models.Model):
branch_id = fields.Many2one("res.branch", string="Branch")
district_id = fields.Many2one("res.district", string="District")
region_id = fields.Many2one("res.region", string="Region")
current_location_id = fields.Many2one("fsm.location", string="Current Location")
current_location_id = fields.Many2one(
"fsm.location", string="Current Location", required=True
)

managed_by_id = fields.Many2one("res.partner", string="Managed By")
owned_by_id = fields.Many2one("res.partner", string="Owned By")
parent_id = fields.Many2one("fsm.equipment", string="Parent")
Expand Down
26 changes: 9 additions & 17 deletions fieldservice/models/fsm_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class FSMLocation(models.Model):
string="Complete Name", compute="_compute_complete_name", store=True
)
hide = fields.Boolean(default=False)

stage_id = fields.Many2one(
"fsm.stage",
string="Stage",
Expand All @@ -80,7 +79,7 @@ class FSMLocation(models.Model):
default=lambda self: self._default_stage_id(),
)

@api.depends("partner_id.name", "fsm_parent_id.complete_name", "ref")
@api.depends("partner_id.name", "fsm_parent_id.complete_name")
def _compute_complete_name(self):
for loc in self:
if loc.fsm_parent_id:
Expand Down Expand Up @@ -110,9 +109,7 @@ def name_search(self, name, args=None, operator="ilike", limit=100):
recs = self.browse()
if name:
recs = self.search([("ref", "ilike", name)] + args, limit=limit)
if not recs and self.env.user.company_id.search_on_complete_name:
recs = self.search([("complete_name", operator, name)] + args, limit=limit)
if not recs and not self.env.user.company_id.search_on_complete_name:
if not recs:
recs = self.search([("name", operator, name)] + args, limit=limit)
return recs.name_get()

Expand Down Expand Up @@ -288,15 +285,15 @@ def action_view_contacts(self):
action = self.env.ref("contacts.action_contacts").read()[0]
contacts = self.get_action_views(1, 0, location)
action["context"] = self.env.context.copy()
action["context"].update({"group_by": ""})
action["context"].update({"default_service_location_id": self.id})
if len(contacts) == 0 or len(contacts) > 1:
action["domain"] = [("id", "in", contacts.ids)]
elif contacts:
action["views"] = [
(self.env.ref("base." + "view_partner_form").id, "form")
]
if len(contacts) == 1:
action["views"] = [(self.env.ref("base.view_partner_form").id, "form")]
action["res_id"] = contacts.id
action["context"].update({"active_id": contacts.id})
else:
action["domain"] = [("id", "in", contacts.ids)]
action["context"].update({"active_ids": contacts.ids})
action["context"].update({"active_id": ""})
return action

def _compute_contact_ids(self):
Expand All @@ -314,7 +311,6 @@ def action_view_equipment(self):
action = self.env.ref("fieldservice.action_fsm_equipment").read()[0]
equipment = self.get_action_views(0, 1, location)
action["context"] = self.env.context.copy()
action["context"].update({"group_by": ""})
action["context"].update({"default_location_id": self.id})
if len(equipment) == 0 or len(equipment) > 1:
action["domain"] = [("id", "in", equipment.ids)]
Expand Down Expand Up @@ -343,7 +339,6 @@ def action_view_sublocation(self):
action = self.env.ref("fieldservice.action_fsm_location").read()[0]
sublocation = self.get_action_views(0, 0, location)
action["context"] = self.env.context.copy()
action["context"].update({"group_by": ""})
action["context"].update({"default_fsm_parent_id": self.id})
if len(sublocation) > 1 or len(sublocation) == 0:
action["domain"] = [("id", "in", sublocation.ids)]
Expand All @@ -357,9 +352,6 @@ def action_view_sublocation(self):
action["res_id"] = sublocation.id
return action

def geo_localize(self):
return self.partner_id.geo_localize()

def _compute_equipment_ids(self):
for loc in self:
equipment = self.comp_count(0, 1, loc)
Expand Down
Loading

0 comments on commit 00dbb4d

Please sign in to comment.