[ADD] Resource: Add translation i18n folder

[IMP] Resource: improved code

bzr revid: mra@mra-laptop-20100818071115-3clh6ezmcoaf25vz
This commit is contained in:
Mustufa Rangwala
2010-08-18 12:41:15 +05:30
parent 02321c8068
commit 8b8144bb4f
6 changed files with 962 additions and 18 deletions
+3 -3
View File
@@ -19,7 +19,6 @@
#
##############################################################################
{
"name" : "Resource",
"version" : "1.1",
@@ -36,7 +35,7 @@
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['base', 'process'],
'depends': ['process'],
'init_xml': [],
'update_xml': [
'security/ir.model.access.csv',
@@ -48,4 +47,5 @@
'active': False,
'certificate': None,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+318
View File
@@ -0,0 +1,318 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * resource
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-08-18 06:50:02+0000\n"
"PO-Revision-Date: 2010-08-18 06:50:02+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: resource
#: help:resource.calendar.leaves,resource_id:0
msgid "If empty, this is a generic holiday for the company. If a resource is set, the holiday/leave is only for this resource"
msgstr "If empty, this is a generic holiday for the company. If a resource is set, the holiday/leave is only for this resource"
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Friday"
msgstr "Friday"
#. module: resource
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr "The Object name must start with x_ and not contain any special character !"
#. module: resource
#: field:resource.resource,resource_type:0
msgid "Resource Type"
msgstr "Resource Type"
#. module: resource
#: model:ir.model,name:resource.model_resource_calendar_leaves
#: view:resource.calendar.leaves:0
msgid "Leave Detail"
msgstr "Leave Detail"
#. module: resource
#: model:ir.actions.act_window,name:resource.resource_calendar_resources_leaves
msgid "Resources Leaves"
msgstr "Resources Leaves"
#. module: resource
#: field:resource.calendar,attendance_ids:0
#: view:resource.calendar.attendance:0
#: view:resource.calendar.leaves:0
msgid "Working Time"
msgstr "Working Time"
#. module: resource
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Invalid XML for View Architecture!"
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Thursday"
msgstr "Thursday"
#. module: resource
#: view:resource.calendar:0
#: view:resource.calendar.leaves:0
#: view:resource.resource:0
msgid "Group By..."
msgstr "Group By..."
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Sunday"
msgstr "Sunday"
#. module: resource
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Invalid model name in the action definition."
#. module: resource
#: view:resource.resource:0
msgid "Search Resource"
msgstr "Search Resource"
#. module: resource
#: view:resource.resource:0
msgid "Type"
msgstr "Type"
#. module: resource
#: model:ir.actions.act_window,name:resource.action_resource_resource_tree
#: view:resource.resource:0
msgid "Resources"
msgstr "Resources"
#. module: resource
#: field:resource.calendar,manager:0
msgid "Workgroup manager"
msgstr "Workgroup manager"
#. module: resource
#: view:resource.calendar:0
msgid "Search Working Period"
msgstr "Search Working Period"
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Monday"
msgstr "Monday"
#. module: resource
#: model:ir.model,name:resource.model_resource_calendar
msgid "Resource Calendar"
msgstr "Resource Calendar"
#. module: resource
#: field:resource.calendar,company_id:0
#: view:resource.calendar.leaves:0
#: field:resource.calendar.leaves,company_id:0
#: view:resource.resource:0
#: field:resource.resource,company_id:0
msgid "Company"
msgstr "Company"
#. module: resource
#: selection:resource.resource,resource_type:0
msgid "Material"
msgstr "Material"
#. module: resource
#: field:resource.calendar.attendance,dayofweek:0
msgid "Day of week"
msgstr "Day of week"
#. module: resource
#: field:resource.calendar.attendance,date_from:0
msgid "Starting date"
msgstr "Starting date"
#. module: resource
#: view:resource.resource:0
#: field:resource.resource,user_id:0
msgid "User"
msgstr "User"
#. module: resource
#: view:resource.calendar.leaves:0
msgid "Date"
msgstr "Date"
#. module: resource
#: view:resource.calendar.leaves:0
msgid "Search Working Period Leaves"
msgstr "Search Working Period Leaves"
#. module: resource
#: field:resource.calendar.leaves,date_to:0
msgid "End Date"
msgstr "End Date"
#. module: resource
#: model:ir.actions.act_window,name:resource.resource_calendar_closing_days
msgid "Closing Days"
msgstr "Closing Days"
#. module: resource
#: model:ir.module.module,shortdesc:resource.module_meta_information
#: view:resource.calendar.leaves:0
#: field:resource.calendar.leaves,resource_id:0
#: view:resource.resource:0
msgid "Resource"
msgstr "Resource"
#. module: resource
#: view:resource.calendar:0
#: field:resource.calendar,name:0
#: field:resource.calendar.attendance,name:0
#: view:resource.calendar.leaves:0
#: field:resource.calendar.leaves,name:0
#: field:resource.resource,name:0
msgid "Name"
msgstr "Name"
#. module: resource
#: model:ir.module.module,description:resource.module_meta_information
msgid "\n"
" Module for resource management\n"
" A resource represent something that can be scheduled\n"
" (a developer on a task or a workcenter on manufacturing orders).\n"
" This module manages a resource calendar associated to every resource.\n"
" It also manages the leaves of every resource.\n"
"\n"
" "
msgstr "\n"
" Module for resource management\n"
" A resource represent something that can be scheduled\n"
" (a developer on a task or a workcenter on manufacturing orders).\n"
" This module manages a resource calendar associated to every resource.\n"
" It also manages the leaves of every resource.\n"
"\n"
" "
#. module: resource
#: help:resource.resource,active:0
msgid "If the active field is set to true, it will allow you to hide the resource record without removing it."
msgstr "If the active field is set to true, it will allow you to hide the resource record without removing it."
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Wednesday"
msgstr "Wednesday"
#. module: resource
#: model:ir.actions.act_window,name:resource.action_resource_calendar_form
#: view:resource.calendar:0
msgid "Working Period"
msgstr "Working Period"
#. module: resource
#: model:ir.model,name:resource.model_resource_resource
msgid "Resource Detail"
msgstr "Resource Detail"
#. module: resource
#: field:resource.resource,active:0
msgid "Active"
msgstr "Active"
#. module: resource
#: field:resource.calendar.attendance,calendar_id:0
msgid "Resource's Calendar"
msgstr "Resource's Calendar"
#. module: resource
#: help:resource.resource,user_id:0
msgid "Related user name for the resource to manage its access."
msgstr "Related user name for the resource to manage its access."
#. module: resource
#: help:resource.resource,calendar_id:0
msgid "Define the schedule of resource"
msgstr "Define the schedule of resource"
#. module: resource
#: field:resource.calendar.attendance,hour_from:0
msgid "Work from"
msgstr "Work from"
#. module: resource
#: field:resource.resource,code:0
msgid "Code"
msgstr "Code"
#. module: resource
#: field:resource.calendar.attendance,hour_to:0
msgid "Work to"
msgstr "Work to"
#. module: resource
#: help:resource.resource,time_efficiency:0
msgid "This field depict the efficiency of the resource to complete tasks. e.g resource put alone on a phase of 5 days with 5 tasks assigned to him, will show a load of 100% for this phase by default, but if we put a efficency of 200%, then his load will only be 50%."
msgstr "This field depict the efficiency of the resource to complete tasks. e.g resource put alone on a phase of 5 days with 5 tasks assigned to him, will show a load of 100% for this phase by default, but if we put a efficency of 200%, then his load will only be 50%."
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Tuesday"
msgstr "Tuesday"
#. module: resource
#: field:resource.calendar.leaves,calendar_id:0
#: field:resource.resource,calendar_id:0
msgid "Working time"
msgstr "Working time"
#. module: resource
#: model:ir.actions.act_window,name:resource.action_resource_calendar_leave_tree
msgid "Resource Leaves"
msgstr "Resource Leaves"
#. module: resource
#: view:resource.calendar:0
msgid "Manager"
msgstr "Manager"
#. module: resource
#: code:addons/resource/faces/resource.py:0
#, python-format
msgid "(vacation)"
msgstr "(vacation)"
#. module: resource
#: field:resource.resource,time_efficiency:0
msgid "Efficiency factor"
msgstr "Efficiency factor"
#. module: resource
#: selection:resource.resource,resource_type:0
msgid "Human"
msgstr "Human"
#. module: resource
#: model:ir.model,name:resource.model_resource_calendar_attendance
msgid "Work Detail"
msgstr "Work Detail"
#. module: resource
#: field:resource.calendar.leaves,date_from:0
msgid "Start Date"
msgstr "Start Date"
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Saturday"
msgstr "Saturday"
+310
View File
@@ -0,0 +1,310 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * resource
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-08-18 06:50:02+0000\n"
"PO-Revision-Date: 2010-08-18 06:50:02+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: resource
#: help:resource.calendar.leaves,resource_id:0
msgid "If empty, this is a generic holiday for the company. If a resource is set, the holiday/leave is only for this resource"
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Friday"
msgstr ""
#. module: resource
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: resource
#: field:resource.resource,resource_type:0
msgid "Resource Type"
msgstr ""
#. module: resource
#: model:ir.model,name:resource.model_resource_calendar_leaves
#: view:resource.calendar.leaves:0
msgid "Leave Detail"
msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.resource_calendar_resources_leaves
msgid "Resources Leaves"
msgstr ""
#. module: resource
#: field:resource.calendar,attendance_ids:0
#: view:resource.calendar.attendance:0
#: view:resource.calendar.leaves:0
msgid "Working Time"
msgstr ""
#. module: resource
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Thursday"
msgstr ""
#. module: resource
#: view:resource.calendar:0
#: view:resource.calendar.leaves:0
#: view:resource.resource:0
msgid "Group By..."
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Sunday"
msgstr ""
#. module: resource
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: resource
#: view:resource.resource:0
msgid "Search Resource"
msgstr ""
#. module: resource
#: view:resource.resource:0
msgid "Type"
msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.action_resource_resource_tree
#: view:resource.resource:0
msgid "Resources"
msgstr ""
#. module: resource
#: field:resource.calendar,manager:0
msgid "Workgroup manager"
msgstr ""
#. module: resource
#: view:resource.calendar:0
msgid "Search Working Period"
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Monday"
msgstr ""
#. module: resource
#: model:ir.model,name:resource.model_resource_calendar
msgid "Resource Calendar"
msgstr ""
#. module: resource
#: field:resource.calendar,company_id:0
#: view:resource.calendar.leaves:0
#: field:resource.calendar.leaves,company_id:0
#: view:resource.resource:0
#: field:resource.resource,company_id:0
msgid "Company"
msgstr ""
#. module: resource
#: selection:resource.resource,resource_type:0
msgid "Material"
msgstr ""
#. module: resource
#: field:resource.calendar.attendance,dayofweek:0
msgid "Day of week"
msgstr ""
#. module: resource
#: field:resource.calendar.attendance,date_from:0
msgid "Starting date"
msgstr ""
#. module: resource
#: view:resource.resource:0
#: field:resource.resource,user_id:0
msgid "User"
msgstr ""
#. module: resource
#: view:resource.calendar.leaves:0
msgid "Date"
msgstr ""
#. module: resource
#: view:resource.calendar.leaves:0
msgid "Search Working Period Leaves"
msgstr ""
#. module: resource
#: field:resource.calendar.leaves,date_to:0
msgid "End Date"
msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.resource_calendar_closing_days
msgid "Closing Days"
msgstr ""
#. module: resource
#: model:ir.module.module,shortdesc:resource.module_meta_information
#: view:resource.calendar.leaves:0
#: field:resource.calendar.leaves,resource_id:0
#: view:resource.resource:0
msgid "Resource"
msgstr ""
#. module: resource
#: view:resource.calendar:0
#: field:resource.calendar,name:0
#: field:resource.calendar.attendance,name:0
#: view:resource.calendar.leaves:0
#: field:resource.calendar.leaves,name:0
#: field:resource.resource,name:0
msgid "Name"
msgstr ""
#. module: resource
#: model:ir.module.module,description:resource.module_meta_information
msgid "\n"
" Module for resource management\n"
" A resource represent something that can be scheduled\n"
" (a developer on a task or a workcenter on manufacturing orders).\n"
" This module manages a resource calendar associated to every resource.\n"
" It also manages the leaves of every resource.\n"
"\n"
" "
msgstr ""
#. module: resource
#: help:resource.resource,active:0
msgid "If the active field is set to true, it will allow you to hide the resource record without removing it."
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Wednesday"
msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.action_resource_calendar_form
#: view:resource.calendar:0
msgid "Working Period"
msgstr ""
#. module: resource
#: model:ir.model,name:resource.model_resource_resource
msgid "Resource Detail"
msgstr ""
#. module: resource
#: field:resource.resource,active:0
msgid "Active"
msgstr ""
#. module: resource
#: field:resource.calendar.attendance,calendar_id:0
msgid "Resource's Calendar"
msgstr ""
#. module: resource
#: help:resource.resource,user_id:0
msgid "Related user name for the resource to manage its access."
msgstr ""
#. module: resource
#: help:resource.resource,calendar_id:0
msgid "Define the schedule of resource"
msgstr ""
#. module: resource
#: field:resource.calendar.attendance,hour_from:0
msgid "Work from"
msgstr ""
#. module: resource
#: field:resource.resource,code:0
msgid "Code"
msgstr ""
#. module: resource
#: field:resource.calendar.attendance,hour_to:0
msgid "Work to"
msgstr ""
#. module: resource
#: help:resource.resource,time_efficiency:0
msgid "This field depict the efficiency of the resource to complete tasks. e.g resource put alone on a phase of 5 days with 5 tasks assigned to him, will show a load of 100% for this phase by default, but if we put a efficency of 200%, then his load will only be 50%."
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Tuesday"
msgstr ""
#. module: resource
#: field:resource.calendar.leaves,calendar_id:0
#: field:resource.resource,calendar_id:0
msgid "Working time"
msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.action_resource_calendar_leave_tree
msgid "Resource Leaves"
msgstr ""
#. module: resource
#: view:resource.calendar:0
msgid "Manager"
msgstr ""
#. module: resource
#: code:addons/resource/faces/resource.py:0
#, python-format
msgid "(vacation)"
msgstr ""
#. module: resource
#: field:resource.resource,time_efficiency:0
msgid "Efficiency factor"
msgstr ""
#. module: resource
#: selection:resource.resource,resource_type:0
msgid "Human"
msgstr ""
#. module: resource
#: model:ir.model,name:resource.model_resource_calendar_attendance
msgid "Work Detail"
msgstr ""
#. module: resource
#: field:resource.calendar.leaves,date_from:0
msgid "Start Date"
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Saturday"
msgstr ""
+310
View File
@@ -0,0 +1,310 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * resource
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-08-18 06:50:02+0000\n"
"PO-Revision-Date: 2010-08-18 06:50:02+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: resource
#: help:resource.calendar.leaves,resource_id:0
msgid "If empty, this is a generic holiday for the company. If a resource is set, the holiday/leave is only for this resource"
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Friday"
msgstr ""
#. module: resource
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: resource
#: field:resource.resource,resource_type:0
msgid "Resource Type"
msgstr ""
#. module: resource
#: model:ir.model,name:resource.model_resource_calendar_leaves
#: view:resource.calendar.leaves:0
msgid "Leave Detail"
msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.resource_calendar_resources_leaves
msgid "Resources Leaves"
msgstr ""
#. module: resource
#: field:resource.calendar,attendance_ids:0
#: view:resource.calendar.attendance:0
#: view:resource.calendar.leaves:0
msgid "Working Time"
msgstr ""
#. module: resource
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Thursday"
msgstr ""
#. module: resource
#: view:resource.calendar:0
#: view:resource.calendar.leaves:0
#: view:resource.resource:0
msgid "Group By..."
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Sunday"
msgstr ""
#. module: resource
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: resource
#: view:resource.resource:0
msgid "Search Resource"
msgstr ""
#. module: resource
#: view:resource.resource:0
msgid "Type"
msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.action_resource_resource_tree
#: view:resource.resource:0
msgid "Resources"
msgstr ""
#. module: resource
#: field:resource.calendar,manager:0
msgid "Workgroup manager"
msgstr ""
#. module: resource
#: view:resource.calendar:0
msgid "Search Working Period"
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Monday"
msgstr ""
#. module: resource
#: model:ir.model,name:resource.model_resource_calendar
msgid "Resource Calendar"
msgstr ""
#. module: resource
#: field:resource.calendar,company_id:0
#: view:resource.calendar.leaves:0
#: field:resource.calendar.leaves,company_id:0
#: view:resource.resource:0
#: field:resource.resource,company_id:0
msgid "Company"
msgstr ""
#. module: resource
#: selection:resource.resource,resource_type:0
msgid "Material"
msgstr ""
#. module: resource
#: field:resource.calendar.attendance,dayofweek:0
msgid "Day of week"
msgstr ""
#. module: resource
#: field:resource.calendar.attendance,date_from:0
msgid "Starting date"
msgstr ""
#. module: resource
#: view:resource.resource:0
#: field:resource.resource,user_id:0
msgid "User"
msgstr ""
#. module: resource
#: view:resource.calendar.leaves:0
msgid "Date"
msgstr ""
#. module: resource
#: view:resource.calendar.leaves:0
msgid "Search Working Period Leaves"
msgstr ""
#. module: resource
#: field:resource.calendar.leaves,date_to:0
msgid "End Date"
msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.resource_calendar_closing_days
msgid "Closing Days"
msgstr ""
#. module: resource
#: model:ir.module.module,shortdesc:resource.module_meta_information
#: view:resource.calendar.leaves:0
#: field:resource.calendar.leaves,resource_id:0
#: view:resource.resource:0
msgid "Resource"
msgstr ""
#. module: resource
#: view:resource.calendar:0
#: field:resource.calendar,name:0
#: field:resource.calendar.attendance,name:0
#: view:resource.calendar.leaves:0
#: field:resource.calendar.leaves,name:0
#: field:resource.resource,name:0
msgid "Name"
msgstr ""
#. module: resource
#: model:ir.module.module,description:resource.module_meta_information
msgid "\n"
" Module for resource management\n"
" A resource represent something that can be scheduled\n"
" (a developer on a task or a workcenter on manufacturing orders).\n"
" This module manages a resource calendar associated to every resource.\n"
" It also manages the leaves of every resource.\n"
"\n"
" "
msgstr ""
#. module: resource
#: help:resource.resource,active:0
msgid "If the active field is set to true, it will allow you to hide the resource record without removing it."
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Wednesday"
msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.action_resource_calendar_form
#: view:resource.calendar:0
msgid "Working Period"
msgstr ""
#. module: resource
#: model:ir.model,name:resource.model_resource_resource
msgid "Resource Detail"
msgstr ""
#. module: resource
#: field:resource.resource,active:0
msgid "Active"
msgstr ""
#. module: resource
#: field:resource.calendar.attendance,calendar_id:0
msgid "Resource's Calendar"
msgstr ""
#. module: resource
#: help:resource.resource,user_id:0
msgid "Related user name for the resource to manage its access."
msgstr ""
#. module: resource
#: help:resource.resource,calendar_id:0
msgid "Define the schedule of resource"
msgstr ""
#. module: resource
#: field:resource.calendar.attendance,hour_from:0
msgid "Work from"
msgstr ""
#. module: resource
#: field:resource.resource,code:0
msgid "Code"
msgstr ""
#. module: resource
#: field:resource.calendar.attendance,hour_to:0
msgid "Work to"
msgstr ""
#. module: resource
#: help:resource.resource,time_efficiency:0
msgid "This field depict the efficiency of the resource to complete tasks. e.g resource put alone on a phase of 5 days with 5 tasks assigned to him, will show a load of 100% for this phase by default, but if we put a efficency of 200%, then his load will only be 50%."
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Tuesday"
msgstr ""
#. module: resource
#: field:resource.calendar.leaves,calendar_id:0
#: field:resource.resource,calendar_id:0
msgid "Working time"
msgstr ""
#. module: resource
#: model:ir.actions.act_window,name:resource.action_resource_calendar_leave_tree
msgid "Resource Leaves"
msgstr ""
#. module: resource
#: view:resource.calendar:0
msgid "Manager"
msgstr ""
#. module: resource
#: code:addons/resource/faces/resource.py:0
#, python-format
msgid "(vacation)"
msgstr ""
#. module: resource
#: field:resource.resource,time_efficiency:0
msgid "Efficiency factor"
msgstr ""
#. module: resource
#: selection:resource.resource,resource_type:0
msgid "Human"
msgstr ""
#. module: resource
#: model:ir.model,name:resource.model_resource_calendar_attendance
msgid "Work Detail"
msgstr ""
#. module: resource
#: field:resource.calendar.leaves,date_from:0
msgid "Start Date"
msgstr ""
#. module: resource
#: selection:resource.calendar.attendance,dayofweek:0
msgid "Saturday"
msgstr ""
+17 -13
View File
@@ -18,6 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from datetime import datetime, timedelta
import time
import math
@@ -37,23 +38,23 @@ class resource_calendar(osv.osv):
_defaults = {
'company_id': lambda self, cr, uid, context: self.pool.get('res.company')._company_default_get(cr, uid, 'resource.calendar', context=context)
}
def _get_leaves(self, cr, uid, id, resource):
resource_cal_leaves = self.pool.get('resource.calendar.leaves')
dt_leave = []
resource_leave_ids = resource_cal_leaves.search(cr, uid, [('calendar_id','=',id), '|', ('resource_id','=',False), ('resource_id','=',resource)])
res_leaves = resource_cal_leaves.read(cr, uid, resource_leave_ids, ['date_from', 'date_to'])
for leave in res_leaves:
dtf = datetime.strptime(leave['date_from'], '%Y-%m-%d %H:%M:%S')
dtt = datetime.strptime(leave['date_to'], '%Y-%m-%d %H:%M:%S')
no = dtt - dtf
[dt_leave.append((dtf + timedelta(days=x)).strftime('%Y-%m-%d')) for x in range(int(no.days + 1))]
dt_leave.sort()
return dt_leave
def interval_min_get(self, cr, uid, id, dt_from, hours, resource=False):
if not id:
td = int(hours)*3
@@ -127,14 +128,14 @@ class resource_calendar(osv.osv):
current_hour = 0
maxrecur -= 1
return result
def interval_hours_get(self, cr, uid, id, dt_from, dt_to, resource=False):
result = []
if not id:
return 0.0
dt_leave = self._get_leaves(cr, uid, id, resource)
hours = 0.0
current_hour = dt_from.hour
while (dt_from <= dt_to):
@@ -150,16 +151,16 @@ class resource_calendar(osv.osv):
if dt_check == leave:
dt_check = datetime.strptime(dt_check, "%Y-%m-%d") + timedelta(days=1)
leave_flag = True
if leave_flag:
break
else:
d1 = dt_from
d2 = datetime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(hour_to)), int((hour_to%1) * 60))
if hours != 0.0:#For first time of the loop only,hours will be 0
d1 = datetime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(current_hour)), int((current_hour%1) * 60))
if dt_from.day == dt_to.day:
if hour_from <= dt_to.hour <= hour_to:
d2 = dt_to
@@ -167,8 +168,9 @@ class resource_calendar(osv.osv):
hours += (d2-d1).seconds
dt_from = datetime(dt_from.year, dt_from.month, dt_from.day, int(math.floor(current_hour)), int((current_hour%1) * 60)) + timedelta(days=1)
current_hour = 0.0
return (hours/3600)
resource_calendar()
class resource_calendar_attendance(osv.osv):
@@ -229,6 +231,7 @@ class resource_calendar_leaves(osv.osv):
'date_to' : fields.datetime('End Date', required=True),
'resource_id' : fields.many2one("resource.resource", "Resource", help="If empty, this is a generic holiday for the company. If a resource is set, the holiday/leave is only for this resource"),
}
def check_dates(self, cr, uid, ids, context={}):
leave = self.read(cr, uid, ids[0], ['date_from', 'date_to'])
if leave['date_from'] and leave['date_to']:
@@ -240,7 +243,7 @@ class resource_calendar_leaves(osv.osv):
(check_dates, 'Error! leave start-date must be lower then leave end-date.', ['date_from', 'date_to'])
]
def onchange_resource(self,cr, uid, ids, resource, context={}):
def onchange_resource(self,cr, uid, ids, resource, context=None):
result = {}
if resource:
resource_pool = self.pool.get('resource.resource')
@@ -249,4 +252,5 @@ class resource_calendar_leaves(osv.osv):
return {'value': {'calendar_id': []}}
resource_calendar_leaves()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+4 -2
View File
@@ -26,8 +26,7 @@
</field>
</record>
<record id="view_resource_calendar_search" model="ir.ui.view">
<record id="view_resource_calendar_search" model="ir.ui.view">
<field name="name">resource.calendar.search</field>
<field name="model">resource.calendar</field>
<field name="type">search</field>
@@ -117,6 +116,7 @@
</tree>
</field>
</record>
<record id="view_resource_calendar_attendance_form" model="ir.ui.view">
<field name="name">resource.calendar.attendance.form</field>
<field name="model">resource.calendar.attendance</field>
@@ -175,6 +175,7 @@
</form>
</field>
</record>
<record id="resource_resource_tree" model="ir.ui.view">
<field name="name">resource.resource.tree</field>
<field name="model">resource.resource</field>
@@ -190,6 +191,7 @@
</tree>
</field>
</record>
<record id="action_resource_resource_tree" model="ir.actions.act_window">
<field name="name">Resources</field>
<field name="res_model">resource.resource</field>