Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from savoirfairelinux/11.0-mig-calendar_calenda…
…r_resource [11.0][MIG] calendar_resource
- Loading branch information
Showing
87 changed files
with
12,207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
language: python | ||
sudo: false | ||
cache: pip | ||
|
||
python: | ||
- "3.5" | ||
|
||
addons: | ||
postgresql: "9.5" | ||
apt: | ||
packages: | ||
- expect-dev | ||
|
||
env: | ||
global: | ||
- VERSION="11.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0" | ||
- PHANTOMJS_VERSION="latest" | ||
- WEBSITE_REPO="1" | ||
|
||
matrix: | ||
- LINT_CHECK="1" | ||
- TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1" | ||
- TESTS="1" ODOO_REPO="OCA/OCB" | ||
|
||
install: | ||
- git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools | ||
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} | ||
- travis_install_nightly | ||
|
||
script: | ||
- travis_run_tests | ||
|
||
after_success: | ||
- travis_after_tests_success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
================== | ||
Calendar Resources | ||
================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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%2Fcalendar-lightgray.png?logo=github | ||
:target: https://github.com/OCA/calendar/tree/11.0/calendar_resource | ||
:alt: OCA/calendar | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/calendar-11-0/calendar-11-0-calendar_resource | ||
:alt: Translate me on Weblate | ||
|
||
|badge1| |badge2| |badge3| |badge4| | ||
|
||
This module adds new features to facilitate resource management with meetings: | ||
|
||
* To attach resources to a meeting, go to `Calendar` => Click on a meeting => `Edit` => | ||
`Edit` => add any related resources. | ||
* To edit or add a resource, go to `Calendar` => `Resources` => `Resources`. | ||
* This module can also prevent resources from being double-booked. Go to a resource | ||
and disable or enable `Allow Double Booking` (this is disabled by default). As a note, the same | ||
resource in a meeting that ends at 5pm and in a meeting that starts at 5pm on the same day | ||
would not not be considered double-booked. | ||
* You can restrict resources to certain calendar types. In the Resources form view, edit the | ||
`Event Types` field. The resource can then be added to events only of those types. | ||
* Resources cannot be added to events when they're not available, either because they're on leave | ||
or because the event time is outside their working time. | ||
* If you have an event selected as `allday`, only if there are no working times available | ||
on 1 or more of the days in that event will an error be raised. For example, if you set | ||
an event to `allday` on a Saturday and there are no working times at all that Saturday | ||
for a particular resource, then an error will be raised. However, if there is at least | ||
1 working time interval for that resource on the Saturday, regardless of how long or | ||
short that working time is, the day will be considered covered by that working time. | ||
If the event is not `allday`, any time the resource is not available during the event, | ||
regardless of the time of day, will cause an error to be raised. | ||
* To stop leaves and working time validations on a resource when adding to an event, | ||
set the resource's `Working Time` field to blank in the resource form view. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/111/11.0 | ||
|
||
|
||
Known issues / Roadmap | ||
====================== | ||
|
||
* Abstract out logic from _check_resource_ids_working_times into separate methods in | ||
resource.calendar. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/calendar/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/calendar/issues/new?body=module:%20calendar_resource%0Aversion:%2011.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 | ||
~~~~~~~ | ||
|
||
* Savoir-faire Linux | ||
* LasLabs | ||
|
||
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/calendar <https://github.com/OCA/calendar/tree/11.0/calendar_resource>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright 2014 Therp BV | ||
# Copyright 2018 Savoir-faire Linux | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 2017 Laslabs Inc. | ||
# Copyright 2018 Savoir-faire Linux | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
"name": "Calendar Resources", | ||
"summary": "New features to facilitate resource management with meetings.", | ||
"version": "11.0.1.0.0", | ||
"category": "Calendar", | ||
"website": "https://github.com/OCA/calendar", | ||
"author": "Savoir-faire Linux, LasLabs, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"application": False, | ||
"installable": True, | ||
"depends": [ | ||
"resource", | ||
"calendar", | ||
], | ||
"data": [ | ||
"security/resource_security.xml", | ||
"security/ir.model.access.csv", | ||
"views/calendar_event_view.xml", | ||
"views/resource_resource_view.xml", | ||
"views/calendar_menu.xml", | ||
], | ||
"demo": [ | ||
"demo/resource_calendar.xml", | ||
"demo/resource_calendar_attendance.xml", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright 2017 LasLabs Inc. | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
|
||
<odoo> | ||
|
||
<record id="resource_calendar_1" model="resource.calendar"> | ||
<field name="name">Resource Demo Calendar</field> | ||
</record> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright 2017 LasLabs Inc. | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
|
||
<odoo> | ||
|
||
<record id="resource_calendar_attendance_1" model="resource.calendar.attendance"> | ||
<field name="name">Interval 1</field> | ||
<field name="dayofweek">1</field> | ||
<field name="hour_from" eval="12" /> | ||
<field name="hour_to" eval="20" /> | ||
<field name="calendar_id" ref="resource_calendar_1" /> | ||
</record> | ||
|
||
<record id="resource_calendar_attendance_2" model="resource.calendar.attendance"> | ||
<field name="name">Interval 2</field> | ||
<field name="dayofweek">1</field> | ||
<field name="hour_from" eval="20" /> | ||
<field name="hour_to" eval="23.99" /> | ||
<field name="calendar_id" ref="resource_calendar_1" /> | ||
</record> | ||
|
||
<record id="resource_calendar_attendance_3" model="resource.calendar.attendance"> | ||
<field name="name">Interval 3</field> | ||
<field name="dayofweek">2</field> | ||
<field name="hour_from" eval="5" /> | ||
<field name="hour_to" eval="11.5" /> | ||
<field name="calendar_id" ref="resource_calendar_1" /> | ||
</record> | ||
|
||
<record id="resource_calendar_attendance_4" model="resource.calendar.attendance"> | ||
<field name="name">Interval 4</field> | ||
<field name="dayofweek">1</field> | ||
<field name="hour_from" eval="0" /> | ||
<field name="hour_to" eval="16" /> | ||
<field name="calendar_id" ref="resource_calendar_1" /> | ||
</record> | ||
|
||
<record id="resource_calendar_attendance_5" model="resource.calendar.attendance"> | ||
<field name="name">Interval 5</field> | ||
<field name="dayofweek">3</field> | ||
<field name="hour_from" eval="9" /> | ||
<field name="hour_to" eval="23.99" /> | ||
<field name="calendar_id" ref="resource_calendar_1" /> | ||
</record> | ||
|
||
<record id="resource_calendar_attendance_6" model="resource.calendar.attendance"> | ||
<field name="name">Interval 6</field> | ||
<field name="dayofweek">2</field> | ||
<field name="hour_from" eval="0" /> | ||
<field name="hour_to" eval="16" /> | ||
<field name="calendar_id" ref="resource_calendar_1" /> | ||
</record> | ||
|
||
</odoo> |
Oops, something went wrong.