summaryrefslogtreecommitdiff
path: root/addons/resource/data/resource_data.xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2016-11-07 10:23:00 +0100
committerThibault Delavallée <tde@odoo.com>2017-01-18 10:24:41 +0100
commit9250cc60e154355d165dcf7d0183325023a4228e (patch)
treed82070d7c1d8caaf6efd2ee595335741db40f21e /addons/resource/data/resource_data.xml
parent1c4ea80f782ec1058cc6243ecd5d23a3f2c4629c (diff)
[IMP] resource: set default calendar as data
Currently there is no default resource calendar. This leads to calendar being rarely used as it is not clear how to define them and how to use them. Moreover some code handle default-like calendar by trying to use 8-16 work hours; this should be replaced by having a real default calendar. This commit replaces the demo calendar by a real data calendar. It will soon be used as default everywhere a resource calendar can be defined. Future improvements will come to make resource easier to use and clean its API. This commit is only the beginning !
Diffstat (limited to 'addons/resource/data/resource_data.xml')
-rw-r--r--addons/resource/data/resource_data.xml20
1 files changed, 20 insertions, 0 deletions
diff --git a/addons/resource/data/resource_data.xml b/addons/resource/data/resource_data.xml
new file mode 100644
index 00000000000..f6721316fb1
--- /dev/null
+++ b/addons/resource/data/resource_data.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="resource_calendar_std" model="resource.calendar">
+ <field name="name">Standard 40 Hours/Week</field>
+ <field name="attendance_ids" eval="[
+(5, 0),
+(0, 0, {'name': 'Monday Morning', 'dayofweek': '0', 'hour_from': 8, 'hour_to': 12}),
+(0, 0, {'name': 'Monday Evening', 'dayofweek': '0', 'hour_from': 13, 'hour_to': 17}),
+(0, 0, {'name': 'Tuesday Morning', 'dayofweek': '1', 'hour_from': 8, 'hour_to': 12}),
+(0, 0, {'name': 'Tuesday Evening', 'dayofweek': '1', 'hour_from': 13, 'hour_to': 17}),
+(0, 0, {'name': 'Wednesday Morning', 'dayofweek': '2', 'hour_from': 8, 'hour_to': 12}),
+(0, 0, {'name': 'Wednesday Evening', 'dayofweek': '2', 'hour_from': 13, 'hour_to': 17}),
+(0, 0, {'name': 'Thursday Morning', 'dayofweek': '3', 'hour_from': 8, 'hour_to': 12}),
+(0, 0, {'name': 'Thursday Evening', 'dayofweek': '3', 'hour_from': 13, 'hour_to': 17}),
+(0, 0, {'name': 'Friday Morning', 'dayofweek': '4', 'hour_from': 8, 'hour_to': 12}),
+(0, 0, {'name': 'Friday Evening', 'dayofweek': '4', 'hour_from': 13, 'hour_to': 17}),
+]"/>
+ <field name="company_id" ref="base.main_company"/>
+ </record>
+</odoo>