summaryrefslogtreecommitdiff
path: root/addons/resource/data
diff options
context:
space:
mode:
authorjem-odoo <jem@openerp.com>2017-11-06 15:12:08 +0100
committerjem-odoo <jem@openerp.com>2018-01-29 10:10:46 +0100
commit8386773a5b431accc484b7a0e2b27ed04cc9735b (patch)
treec7aa50f8042dac4b22b892dd610e866db275d312 /addons/resource/data
parentc667853f59aec278ef0879bf800bd5aa477e76fe (diff)
[IMP] resource: define a conversion factor hour to day on working calendar
Using a working calendar, you might want to know how much hour correspond a work day. This depends of you working calendar. This might be usefull to compute leave duration (half a day is not 8 hours, but 4). The hours_per_day field is not computed as the average of working hour of all work day of calendar to allow customization. By default, it is 8, as the default attendances are the one from the 40h/week calendar. A constant is also available to handle case where resource calendar is not available.
Diffstat (limited to 'addons/resource/data')
-rw-r--r--addons/resource/data/resource_data.xml2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/resource/data/resource_data.xml b/addons/resource/data/resource_data.xml
index bcfd2c91446..84d0e86f46e 100644
--- a/addons/resource/data/resource_data.xml
+++ b/addons/resource/data/resource_data.xml
@@ -24,6 +24,7 @@
<record id="resource_calendar_std_35h" model="resource.calendar">
<field name="name">Standard 35 Hours/Week</field>
<field name="company_id" ref="base.main_company"/>
+ <field name="hours_per_day">7.0</field>
<field name="attendance_ids"
eval="[
(0, 0, {'name': 'Monday Morning', 'dayofweek': '0', 'hour_from': 8, 'hour_to': 12}),
@@ -43,6 +44,7 @@
<record id="resource_calendar_std_38h" model="resource.calendar">
<field name="name">Standard 38 Hours/Week</field>
<field name="company_id" ref="base.main_company"/>
+ <field name="hours_per_day">7.6</field>
<field name="attendance_ids"
eval="[
(0, 0, {'name': 'Monday Morning', 'dayofweek': '0', 'hour_from': 8, 'hour_to': 12}),