[MERGE] hr_holidays: Demo data added

scrum: Demo data for hour
hr_timesheet_invoice: Correct search view (MERGE PSI Branch)

bzr revid: mra@tinyerp.com-20100521075826-enc7m8dnd13hkc8o
This commit is contained in:
mra (Open ERP)
2010-05-21 13:28:26 +05:30
6 changed files with 87 additions and 55 deletions
+1 -1
View File
@@ -61,7 +61,7 @@
'wizard/hr_holidays_summary_employees_view.xml',
#'process/hr_holidays_process.xml'
],
'demo_xml': [],
'demo_xml': ['hr_holidays_demo.xml',],
'installable': True,
'active': False,
'certificate': '0086579209325',
+1 -2
View File
@@ -23,7 +23,6 @@
import time
import datetime
import pooler
import netsvc
from osv import fields, osv
from tools.translate import _
@@ -51,7 +50,7 @@ class hr_holidays_status(osv.osv):
def get_days(self, cr, uid, ids, employee_id, return_false, context={}):
res = {}
for record in self.browse(cr, uid, ids, context):
for record in self.browse(cr, uid, ids, context=context):
res[record.id] = {}
max_leaves = leaves_taken = 0
if not return_false:
+24 -16
View File
@@ -5,38 +5,46 @@
<!-- Casual leave -->
<record model="hr.holidays.status" id="holiday_status_cl">
<field name="name">Casual Leave</field>
<field name="color_name">red</field>
<field name="color_name">black</field>
</record>
<record model="hr.holidays.per.user" id="holiday_user_employee1_cl">
<field name="employee_id" ref="hr.employee1"/>
<field name="holiday_status" ref="holiday_status_cl"/>
<field name="max_leaves">12</field>
</record>
<record model="hr.holidays" id="hr_holidays_employee1_allocation_cl">
<field name="name">Trip with Family</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="type">add</field>
<field name="date_from">2010-01-01 08:00</field>
<field name="date_to">2010-01-03 18:00</field>
<field name="number_of_days_temp">1</field>
<field name="employee_id" ref="hr.employee1"/>
</record>
<record model="hr.holidays" id="hr_holidays_employee1_cl">
<field name="name">Going For Tour</field>
<field name="name">Trip with Family</field>
<field name="holiday_status_id" ref="holiday_status_cl"/>
<field name="date_from">2010-01-01 08:00</field>
<field name="date_to">2010-01-03 18:00</field>
<field name="number_of_days_temp">3</field>
<field name="number_of_days_temp">1</field>
<field name="employee_id" ref="hr.employee1"/>
</record>
<!-- Sick leave -->
<record model="hr.holidays.status" id="holiday_status_sl">
<field name="name">Sickness Leave</field>
<field name="color_name">black</field>
<field name="name">Sick Leave</field>
<field name="color_name">red</field>
</record>
<record model="hr.holidays.per.user" id="holiday_user_employee1_sl">
<field name="employee_id" ref="hr.employee1"/>
<field name="holiday_status" ref="holiday_status_sl"/>
<field name="max_leaves">6</field>
</record>
<record model="hr.holidays" id="hr_holidays_employee1_allocation_sl">
<field name="name">Doctor Appointment</field>
<field name="holiday_status_id" ref="holiday_status_sl"/>
<field name="type">add</field>
<field name="date_from">2010-02-01 00:00</field>
<field name="date_to">2010-02-03 08:00</field>
<field name="number_of_days_temp">3</field>
<field name="employee_id" ref="hr.employee1"/>
</record>
<record model="hr.holidays" id="hr_holidays_employee1_sl">
<field name="name">Sickness</field>
<field name="name">Doctor Appointment</field>
<field name="holiday_status_id" ref="holiday_status_sl"/>
<field name="date_from">2010-02-01 00:00</field>
<field name="date_to">2010-02-03 08:00</field>
+19 -16
View File
@@ -13,7 +13,7 @@
<filter icon="terp-hr" domain="[('state','=','validate')]" string="Validated"
default="context.get('report', False)"/>
<separator orientation="vertical"/>
<field name="user_id" widget="selection" default="uid"/>
<field name="user_id" widget="selection"/>
<field name="department_id" widget="selection">
<filter icon="terp-hr"
domain="[('department_id.manager_id','=',uid)]"
@@ -230,6 +230,7 @@
<field name="view_type">form</field>
<field name="view_id" ref="edit_holiday_new"/>
<field name="domain">[('type','=','remove')]</field>
<field name="context">{'search_default_user_id':uid}</field>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
</record>
@@ -248,20 +249,21 @@
</record>
<menuitem
name="Leave Requests"
parent="menu_open_ask_holidays"
id="menu_open_ask_holidays_new"
action="open_ask_holidays"/>
<menuitem
name="Leave Requests"
parent="menu_open_ask_holidays"
id="menu_open_ask_holidays_new"
action="open_ask_holidays"/>
<record model="ir.actions.act_window" id="open_allocation_holidays">
<field name="name">Allocation Requests</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="context">{'type':'add'}</field>
<field name="domain">[('type','=','add')]</field>
<field name="view_id" ref="allocation_leave_new" />
</record>
<record model="ir.actions.act_window" id="open_allocation_holidays">
<field name="name">Allocation Requests</field>
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="context">{'search_default_user_id':uid,'type':'add'}</field>
<field name="domain">[('type','=','add')]</field>
<field name="view_id" ref="allocation_leave_new"/>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_open_allocation_holidays_tree">
<field name="sequence" eval="1"/>
@@ -288,8 +290,9 @@
<field name="res_model">hr.holidays</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_holiday_simple" />
<field name="context">{'allocation_type':'company', 'report':True}</field>
<field name="view_id" eval="view_holiday_simple"/>
<field name="context">{'search_default_user_id':uid,'allocation_type':'company', 'report':True}</field>
<field name="search_view_id" ref="view_hr_holidays_filter"/>
</record>
<menuitem
@@ -443,11 +443,11 @@
<field name="arch" type="xml">
<search string="Search Timesheet Lines">
<group col='15' colspan='4'>
<field name="date"/>
<separator orientation="vertical"/>
<filter icon="terp-project" string="Current" default="1" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"/>
<separator orientation="vertical"/>
<field name="user_id" widget="selection"/>
<field name="product_id" widget="selection"/>
<field name="analytic_account_id" widget="selection"/>
<field name="general_account_id" widget="selection"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="20">
@@ -482,23 +482,37 @@
<record model="ir.actions.act_window" id="action_random_timesheet_lines_board">
<field name="type">ir.actions.act_window</field>
<field name="name">Timesheet Lines</field>
<field name="name">Working Hours</field>
<field name="res_model">random.timesheet.lines</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_user_id':uid }</field>
<field name="view_id" ref="view_random_timesheet_lines_tree"/>
<field name="search_view_id" ref="view_random_timesheet_lines_search"/>
</record>
<!--Time Tracking menu in project Management-->
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
<menuitem
id="base.menu_project_management_time_tracking"
name="Time Tracking"
parent="base.menu_main_pm" sequence="3"/>
<menuitem action="action_random_timesheet_lines_board" id="menu_project_management_timesheet_lines_board" parent="base.menu_project_management_time_tracking" sequence="7"/>
icon="terp-project"
id="base.menu_main_pm"
name="Project Management"
sequence="1"/>
<menuitem
id="base.menu_project_management_time_tracking"
name="Time Tracking"
parent="base.menu_main_pm"
sequence="3"/>
<menuitem
action="action_random_timesheet_lines_board"
id="menu_project_management_timesheet_lines_board"
parent="base.menu_project_management_time_tracking"
sequence="7"/>
<!--<menuitem action="action_random_timesheet_lines_board" id="menu_hr_action_random_timesheet_lines_board"
parent="hr_attendance.menu_hr_time_tracking" groups="hr.group_hr_manager"/>-->
<menuitem action="action_random_timesheet_lines_board" id="menu_hr_action_random_timesheet_lines_board" name="Timesheets Lines"
parent="hr_attendance.menu_hr_time_tracking" groups="hr.group_hr_manager"/>
<menuitem
action="action_random_timesheet_lines_board"
id="menu_hr_action_random_timesheet_lines_board"
name="Working Hours"
parent="hr_attendance.menu_hr_time_tracking"
groups="hr.group_hr_manager"/>
</data>
</openerp>
+17 -9
View File
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- Resource: project.project -->
<record id="scrum_project_1" model="project.project">
<!-- FIXME !!! -->
<field name="tasks">[24, 25, 28, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 36, 38]</field>
@@ -12,9 +12,9 @@
<field name="name">Open ERP - dev branch</field>
<field model="res.users" name="product_owner_id" search="[('login','=','demo')]"/>
</record>
<!-- Resource: scrum.sprint -->
<record id="scrum_sprint_0" model="scrum.sprint">
<field name="date_stop">2005-12-20</field>
<field name="name">Sprint for V3.2.0</field>
@@ -23,12 +23,13 @@
<field name="project_id" ref="scrum_project_1"/>
<field name="state">open</field>
</record>
<!-- Resource: project.product.backlog -->
<record id="scrum_product_backlog_0" model="scrum.product.backlog">
<field name="priority">3</field>
<field name="name">Automatic migration system</field>
<field name="expected_hours">6.0</field>
<field name="note">This new system will enable you to migrate automatically from an old version of Open ERP to a new one. This system will migrate not only the Open ERP system but also the customers particularities. This happens without any kind of script or programming. It has been possible to carry out such a system thanks to the descriptive approach of Open ERP components. </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
@@ -36,6 +37,7 @@
<record id="scrum_product_backlog_1" model="scrum.product.backlog">
<field name="priority">3</field>
<field name="name">New accounting module</field>
<field name="expected_hours">111.0</field>
<field name="note">The accounting module of Open ERP (financial accounting and management accounting) is being reshaped. New functionnalities will be added: intangible assets, a new way of presenting ledgers and bookings, new stock valuation calculation, and lots of predefined reports. </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
@@ -43,41 +45,47 @@
<record id="scrum_product_backlog_2" model="scrum.product.backlog">
<field name="priority">3</field>
<field name="name">Automated Plugin System to install/uninstall modules</field>
<field name="expected_hours">4.0</field>
<field name="note">We have to develop a plug-in system which will enable to install/remove modules. The basic version of Open ERP will include only the required minimum, and you will select the modules thanks to the plug-in manager. This allows you to limit your system to your real needs: quality management, localisations, project and service management, marketing campaigns, and so on... </field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
</record>
<record id="scrum_product_backlog_3" model="scrum.product.backlog">
<field name="name">Review all terms</field>
<field name="expected_hours">8.0</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
</record>
<record id="scrum_product_backlog_4" model="scrum.product.backlog">
<field name="name">Bugfixes</field>
<field name="expected_hours">6.0</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
</record>
<record id="scrum_product_backlog_5" model="scrum.product.backlog">
<field name="name">Test for 3.2.0 Publishing</field>
<field name="expected_hours">5.0</field>
<field name="note">Test Open ERP to release stable 3.2.0 version. (may be 3.2.0-pre1 ?)</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
</record>
<record id="scrum_product_backlog_6" model="scrum.product.backlog">
<field name="name">Reshape the complete menu</field>
<field name="expected_hours">4.0</field>
<field name="note">Restrucutre the Open ERP menu to be more like others ERP.</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
</record>
<record id="scrum_product_backlog_7" model="scrum.product.backlog">
<field name="name">Editable Trees</field>
<field name="expected_hours">12.0</field>
<field name="note">Editable trees in list and one2many_list widgets.</field>
<field name="sprint_id" ref="scrum_sprint_0"/>
<field name="project_id" ref="scrum_project_1"/>
</record>
<!-- Resource: project.task -->
<record id="scrum_task_3" model="project.task">
<field name="planned_hours">4.0</field>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
@@ -185,6 +193,6 @@
<field name="name">Editable trees</field>
<field name="product_backlog_id" ref="scrum_product_backlog_7"/>
</record>
</data>
</openerp>