Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5b0ac64
[INI] initial commit
mymage May 5, 2020
b1229f5
[DEV] add srv.allocated calendar view
mymage May 6, 2020
6026fe9
[DEV] add equipment reference on calendar
mymage May 7, 2020
5f3259b
[FIX] travis
mymage May 7, 2020
535f01d
[FIX] multiple services _cmp_stop_sked
mymage May 7, 2020
3d67a4c
[DEV] calendar: add employees name; srv_tmplt: add color
mymage May 9, 2020
8793208
[DEV] add timeline view (to fix)
mymage May 10, 2020
5b9e301
[FIX] manage empty duration
mymage May 10, 2020
ad901d7
[DEV] add global ref to allocate service, change timeline group, fix …
mymage May 12, 2020
0b895b1
[DEV] add services generation
mymage May 14, 2020
29bf78a
[REF] menu
mymage May 15, 2020
e918f57
[REF] heavy refactoring
mymage May 16, 2020
bff22f3
[DEV] add off_duty shift, partner reference on employee
mymage May 18, 2020
c89ed3b
[DEV] add next service on template
mymage May 18, 2020
dcf1bb9
[DEV] initial rules and rule class definitions
mymage May 21, 2020
e766ace
[DEV] add initial rules and profile definitions
mymage May 22, 2020
a2491f3
[IMP] Add new field profile on employee
marcelofrare May 24, 2020
f2934cb
Merge pull request #2 from marcelofrare/12_service_planner_mf_improve_01
mymage May 24, 2020
b0d97b3
[DEV] add rule check button on allocate service
mymage May 24, 2020
cf4b9e1
[FIX] var names
mymage May 24, 2020
661b055
[DEV] add check all button (to fix), check on save
mymage May 24, 2020
5eaaba1
[DEV] add expected check, fix next, generation
mymage May 28, 2020
304ea04
[DEV] add expected check, fix readme, fix todo
mymage May 29, 2020
5d786ff
[FIX] service generation; demo data to fix
mymage May 29, 2020
9ca1dcb
[FIX] demo data
mymage May 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions service_planner/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
============================
Vertical NGO - Services Plan
============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fvertical--ngo-lightgray.png?logo=github
:target: https://github.com/OCA/vertical-ngo/tree/12.0/service_planner
:alt: OCA/vertical-ngo
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/vertical-ngo-12-0/vertical-ngo-12-0-service_planner
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/160/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

These module manages the Service Planner.

_TODO_

**Table of contents**

.. contents::
:local:

Installation
============

Install with standard method

Configuration
=============

This module doesn't need configuration

Usage
=====

**Steps to follow to use Service Planner**

**Set up**

**Rules**
* Rules and Rules Fields can not be modified by Users. Read what they do and how to use fields.

**Select Rules → Profile**
* Create a Profile
* Add rule fields with values
* Add profile to Employees: Employee → get one → fill Service Profile

**Employee**
* Create desired Skills: get an Employee → Skill tab → add row → create

**Maintenance → Configuration → Categories**
* Create desired Categories

**Fleet**
* Create desired Types: get a Vehicle → Vehicle Type → create

**Select Template → Container Service**
* Create a list of Container Services to collect single services

**Select Template → Service Template**
* Create a Template Service

* Name, Container Service and Duration are mandatory
* Check if it is an Off Duty Service (normally used to track some informations, ie. rest shifts)
* Add requested Features to be sure to not forget to assign Resources.
(Minimum quantity if zero will not be considered)
* Optional, associate a Next Service: this will be automatically generated starting form the end of this one

**Select Template → Service Template → your template**
* Clik on *Generate Services* button
* Select a Template
* Select a Container
* Select a start date-time
* Select a stop date-time
* Set repetition interval (hours). If interval is inferior to the template duration, this one will be used
* Set available days of week
* Set to use work Calendar
* Set to use holiday
* Click on *Generate* button

**Planning**
* Select Service → List view*
* Select a Service
* Fill resources (eg. Employee, Equipments, Vehicles)
* Check requirements (Template requestested Resources) fulfillment
* Calendar/Timeline: overview / move services

Changelog
=========

12.0.1.0.0 (2020-05-01)
~~~~~~~~~~~~~~~~~~~~~~~

* [INI] Initial development

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/vertical-ngo/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 <https://github.com/OCA/vertical-ngo/issues/new?body=module:%20service_planner%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Stefano Consolaro
* Associazione PNLUG - Gruppo Odoo

Contributors
~~~~~~~~~~~~

* Stefano Consolaro <stefano.consolaro@mymage.it>

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.

This module is part of the `OCA/vertical-ngo <https://github.com/OCA/vertical-ngo/tree/12.0/service_planner>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
56 changes: 56 additions & 0 deletions service_planner/TODO.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ToDo list


**Models**
* service template
* DEV limit to 1 Container Service for off_duty type service
* DEV management of working/holiday calendar
* service rule
* DEV complete rule method management
* calendar
* DEV check module
* demo data
* FIX content


**Views**
* service template form
* FIX custom css loading
* FIX eliminate self.id from next list
* FIX on deploy off_duty set to readonly
* FIX auto select template on generation form
* FIX layout
* service allocate tree
* FIX check rule button position
* FIX direct call of rule method for overlap check
* service allocate form
* FIX direct call of rule method for overlap check
* service allocate calendar
* DEV text format
* DEV lock action on empty cells
* DEV check/alert template expected fulfillment
* FIX employee name display (newline separated)
* FIX element dedicated color (web_calendar)
* service allocate timeline
* DEV try add another level of group (ie. locality)
* DEV check UIX
* DEV check/alert template expected fulfillment
* FIX show computed field (employee_names)
* FIX element dedicated color (web_timeline)
* service rule
* DEV add profile reference to employee, equipment, vehicle
* FIX on deploy lock edit option
* FIX optimize double_assign method
* service profile
* FIX filter available fields for selected rule
* DEV create check for rule-field assignment (association, mandatory)
* reporting
* DEV all


**Security**
* fix model authorizations


**Readme**
oca-gen-addon-readme --repo-name vertical-ngo --branch 12.0 --addon-dir ~/odoo-dev/odoo12/OCA/addons-custom-sp/service_planner/
5 changes: 5 additions & 0 deletions service_planner/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

from . import (
models,
wizards,
)
48 changes: 48 additions & 0 deletions service_planner/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright 2019 Stefano Consolaro (Ass. PNLUG - Gruppo Odoo <http://odoo.pnlug.it>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Vertical NGO - Services Plan",
"summary": "Management of services planning.",
"version": "12.0.1.0.0",

"author": "Stefano Consolaro, "
"Associazione PNLUG - Gruppo Odoo",
"website": "https://github.com/PNLUG/vertical-ngo/",
"license": "AGPL-3",

"category": "Logistics",

"depends": [
'fleet',
'maintenance',
'hr',
'product',
# OCA modules
'web_timeline',
'web_widget_color',
'hr_skill',
],
"data": [
'data/data_service_rule.xml',
'data/data_service_rulefield.xml',
'data/demo.xml',
'security/ir.model.access.csv',
'wizards/service_generate.xml',
'views/service_menu.xml',
'views/service_allocate_view.xml',
'views/service_rule_view.xml',
'views/service_profile_view.xml',
'views/service_aggregator_view.xml',
'views/service_container_view.xml',
'views/service_expected_view.xml',
'views/service_template_view.xml',
'views/fleet_vehicle_views.xml',
'views/employee_partner.xml',
'views/employee_profile.xml',
],
"css": [
'static/src/css/service_planner.css',
],
'installable': True,
}
39 changes: 39 additions & 0 deletions service_planner/data/data_service_rule.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- service.rule -->
<record model="service.rule" id="1">
<field name="method">hour_active_day</field>
<field name="description">Hours active per day</field>
</record>
<record model="service.rule" id="2">
<field name="method">hour_active_week</field>
<field name="description">Rest hours per week</field>
</record>
<record model="service.rule" id="3">
<field name="method">hour_active_month</field>
<field name="description">Rest hours per month</field>
</record>
<record model="service.rule" id="4">
<field name="method">hour_rest_day</field>
<field name="description">Rest hours per day</field>
</record>
<record model="service.rule" id="5">
<field name="method">hour_rest_week</field>
<field name="description">Rest hours per week</field>
</record>
<record model="service.rule" id="6">
<field name="method">hour_rest_month</field>
<field name="description">Rest hours per month</field>
</record>
<record model="service.rule" id="7">
<field name="method">end_of_shift_rest</field>
<field name="description">End of shift rest</field>
</record>
<record model="service.rule" id="8">
<field name="method">end_of_night_shift_rest</field>
<field name="description">End of night shift rest</field>
</record>
</data>
</odoo>

32 changes: 32 additions & 0 deletions service_planner/data/data_service_rulefield.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="0">
<!-- service.rulefields -->
<!-- rule hour_active_day / id=1 -->
<record model="service.rulefield" id="1">
<field name="rule_id">1</field>
<field name="field_name">h_max</field>
<field name="field_desc">Maximum work hours per day</field>
<field name="field_default">12</field>
<field name="field_mandatory">True</field>
</record>
<!-- rule hour_active_week / id=2 -->
<record model="service.rulefield" id="2">
<field name="rule_id">2</field>
<field name="field_name">h_min</field>
<field name="field_desc">Maximum rest hours per week</field>
<field name="field_default">24</field>
<field name="field_mandatory">True</field>
</record>
<!-- rule end_of_shift_rest / id=7 -->
<record model="service.rulefield" id="3">
<field name="rule_id">7</field>
<field name="field_name">is_request</field>
<field name="field_desc">Reguire a rest shift after a work shift</field>
<field name="field_default">True</field>
<field name="field_mandatory">True</field>
</record>

</data>
</odoo>

Loading