Skip to content

Commit

Permalink
Merge pull request #1 from OCA/11.0
Browse files Browse the repository at this point in the history
[MERGE] OCA updates
  • Loading branch information
brian10048 authored Oct 13, 2018
2 parents cfebc73 + b384278 commit 8590738
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 7 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
[![Runbot Status](https://runbot.odoo-community.org/runbot/badge/flat/264/11.0.svg)](https://runbot.odoo-community.org/runbot/repo/github-com-oca-field-service-264)
[![Build Status](https://travis-ci.org/OCA/field-service.svg?branch=11.0)](https://travis-ci.org/OCA/field-service)

# Field Service
# Field Service Management

[Field service management](https://en.wikipedia.org/wiki/Field_service_management) (FSM) coordinates company resources employed at, or en route to, client sites, rather than on the company's premises. FSM most commonly refers to companies who need to manage installation, service or repairs of systems or equipment.

Examples of field service use cases are:

- In telecommunications and cable industry, technicians who install cable or run phone lines into residences or business establishments.
- In healthcare, mobile nurses who provide in-home care for elderly or disabled.
- In gas utilities, engineers who are dispatched to investigate and repair suspected leaks.
- In heavy engineering, mining, industrial and manufacturing, technicians dispatched for preventative maintenance and repair.
- In property maintenance, including landscaping, irrigation, and home and office cleaning.
- In HVAC industry, technicians have the expertise and equipment to investigate units in residential, commercial and industrial environments.

Odoo modules for field service management.

[//]: # (addons)

Expand Down
1 change: 1 addition & 0 deletions fieldservice/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'author': 'Open Source Integrators, Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/field-service',
'depends': [
'base_geolocalize',
'mail',
'web_timeline',
],
Expand Down
18 changes: 18 additions & 0 deletions fieldservice/models/fsm_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@ class FSMLocation(models.Model):
partner_id = fields.Many2one('res.partner', string='Related Partner',
required=True, ondelete='restrict',
auto_join=True)
owner_id = fields.Many2one('res.partner', string='Related Owner',
required=True, ondelete='restrict',
auto_join=True)
customer_id = fields.Many2one('res.partner', string='Related Customer',
required=True, ondelete='restrict',
auto_join=True)
tag_ids = fields.Many2many('fsm.tag',
string='Tags')
building = fields.Char(string='Building', size=35)
floor = fields.Char(string='Floor', size=35)
unit = fields.Char(string='Unit', size=35)
room = fields.Char(string='Room', size=35)
description = fields.Char(string='Description')
territory = fields.Char(string='Territory', size=35)
branch = fields.Char(string='Branch', size=35)
district = fields.Char(string='District', size=35)
region = fields.Char(string='Region', size=35)
timezone = fields.Char(string='Timezone', size=35)

@api.model
def create(self, vals):
Expand Down
91 changes: 86 additions & 5 deletions fieldservice/views/fsm_location.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<!-- Field Service Location -->
<!-- Field Service Location Tree View-->
<record id="fsm_location_tree_view" model="ir.ui.view">
<field name="name">fsm.location.tree</field>
<field name="model">fsm.location</field>
<field name="arch" type="xml">
<tree string="Locations">
<field name="name"/>
<field name="owner_id"/>
<field name="customer_id"/>
<field name="building"/>
<field name="floor"/>
<field name="unit"/>
<field name="room"/>
<field name="partner_latitude"/>
<field name="partner_longitude"/>
</tree>
</field>
</record>

<!-- Field Service Location Form View-->
<record id="fsm_location_form_view" model="ir.ui.view">
<field name="name">fsm.location.form</field>
<field name="model">fsm.location</field>
Expand All @@ -21,32 +30,104 @@
<group>
<group>
<field name="name"/>
<field name="id" invisible="1"/>
<field name="partner_id"
readonly="1"
required="0"
groups="base.group_no_one"
attrs="{'invisible': [('id', '=', False)]}"/>
<field name="owner_id"/>
<field name="customer_id"/>
</group>
<group>
<field name="building"/>
<field name="floor"/>
<field name="unit"/>
<field name="room"/>
<field name="partner_latitude"/>
<field name="partner_longitude"/>
</group>
<group></group>
</group>
<notebook>
<page string="Directions">
<field name="direction" nolabel="1" widget="html"/>
</page>
<page string="Address Information">
<group>
<group>
<field name="territory"/>
<field name="branch"/>
<field name="district"/>
<field name="region"/>
</group>
<group>
<field name="street"/>
<field name="street2"/>
<field name="city"/>
<field name="state_id"/>
<field name="zip"/>
<field name="country_id"/>
</group>
</group>
<newline/>
<group>
<field name="description"/>
<field name="timezone"/>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

<!-- Field Service Location Search View-->
<record id="fsm_location_search_view" model="ir.ui.view">
<field name="name">fsm.location.search</field>
<field name="model">fsm.location</field>
<field name="arch" type="xml">
<search string="Search FSM Location">
<field name="name" filter_domain="['|', ('name','ilike',self)]" string="FSM Location"/>
<field name="partner_id"/>
<field name="owner_id"/>
<field name="customer_id"/>
<field name="building"/>
<field name="floor"/>
<field name="unit"/>
<field name="room"/>
<field name="partner_latitude"/>
<field name="partner_longitude"/>
<field name="territory"/>
<field name="branch"/>
<field name="district"/>
<field name="region"/>
<field name="street"/>
<field name="street2"/>
<field name="city"/>
<field name="state_id"/>
<field name="zip"/>
<field name="country_id"/>
<field name="description"/>
<field name="timezone"/>
<group expand="0" string="Group By">
<filter string="Owner" domain="[]" context="{'group_by':'owner_id'}"/>
<filter string="Customer" domain="[]" context="{'group_by':'customer_id'}"/>
</group>
</search>
</field>
</record>

<record id="action_fsm_location" model="ir.actions.act_window">
<field name="name">Service Locations</field>
<field name="res_model">fsm.location</field>
<field name="view_id" ref="fsm_location_tree_view"/>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="fsm_location_search_view"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create a Service Locations.
</p>
<p>
Module not yet enabled.
</p>
</field>
</record>

Expand Down

0 comments on commit 8590738

Please sign in to comment.