Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions hr_duty_planner/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
models/__pycache__
141 changes: 141 additions & 0 deletions hr_duty_planner/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
=================
HR - Duty Planner
=================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fhr-lightgray.png?logo=github
:target: https://github.com/OCA/hr/tree/12.0/hr_duty_planner
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_duty_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/116/12.0
:alt: Try me on Runbot

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

These module manages the Service Planner.

_TODO_

**Table of contents**

.. contents::
:local:

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.
* Optional, set resources of parent service locked by the next service

**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 Services → 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/hr/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/hr/issues/new?body=module:%20hr_duty_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 <stefano.consolaro@mymage.it>
* Marcelo Frare <mf2965@gmail.com>Associazione PNLUG - Gruppo Odoo

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

* Stefano Consolaro <stefano.consolaro@mymage.it>
* Marcelo Frare <mf2965@gmail.com>

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/hr <https://github.com/OCA/hr/tree/12.0/hr_duty_planner>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
53 changes: 53 additions & 0 deletions hr_duty_planner/TODO.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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

**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 hr --branch 12.0 --addon-dir ~/odoo-dev/odoo12/OCA/addons-custom-sp/hr_duty_planner/
5 changes: 5 additions & 0 deletions hr_duty_planner/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from . import (
models,
wizards,
reports,
)
51 changes: 51 additions & 0 deletions hr_duty_planner/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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": "HR - Duty Planner",
"summary": "Management of duty planning.",
"version": "12.0.1.0.0",

"author": "Stefano Consolaro <stefano.consolaro@mymage.it>, "
"Marcelo Frare <mf2965@gmail.com>"
"Associazione PNLUG - Gruppo Odoo, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/hr/",
"license": "AGPL-3",

"category": "Human Resources",

"depends": [
'fleet',
'maintenance',
'hr',
'product',
# OCA modules
'web_timeline',
'web_widget_color',
'hr_skill',
'hr_employee_partner',
'fleet_vehicle_category',
'report_xlsx',
],
"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/employee_profile.xml',
'reports/xlsx_allocated_service.xml',
],
"css": [
'static/src/css/hr_duty_planner.css',
],
}
39 changes: 39 additions & 0 deletions hr_duty_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>

39 changes: 39 additions & 0 deletions hr_duty_planner/data/data_service_rulefield.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="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>
<record model="service.rulefield" id="2">
<field name="rule_id">1</field>
<field name="field_name">h_min</field>
<field name="field_desc">Minimum work hours per day</field>
<field name="field_default">4</field>
<field name="field_mandatory">True</field>
</record>
<!-- rule hour_active_week / id=2 -->
<record model="service.rulefield" id="3">
<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="4">
<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