bzr revid: fp@tinyerp.com-20100308085647-b971j1d8231aqmk4
This commit is contained in:
Fabien Pinckaers
2010-03-08 09:56:47 +01:00
3 changed files with 19 additions and 19 deletions
+11 -11
View File
@@ -80,20 +80,20 @@ class hr_contract(osv.osv):
_name = 'hr.contract'
_description = 'Contract'
_columns = {
'name' : fields.char('Contract Reference', size=30, required=True),
'employee_id' : fields.many2one('hr.employee', "Employee", required=True),
'department_id' : fields.related('employee_id','department_id', string="Department", readonly=True),
'type_id' : fields.many2one('hr.contract.type', "Contract Type"),
'job_id' : fields.many2one('hr.job', 'Job Title'),
'date_start' : fields.date('Start Date', required=True),
'date_end' : fields.date('End Date'),
'working_hours_per_day_id' : fields.many2one('resource.calendar','Working hours per day'),
'wage_type_id' : fields.many2one('hr.contract.wage.type', 'Wage Type', required=True),
'wage' : fields.float('Wage', digits=(16,2), required=True),
'name': fields.char('Contract Reference', size=30, required=True),
'employee_id': fields.many2one('hr.employee', "Employee", required=True),
'department_id': fields.related('employee_id','department_id', string="Department", readonly=True),
'type_id': fields.many2one('hr.contract.type', "Contract Type"),
'job_id': fields.many2one('hr.job', 'Job Title'),
'date_start': fields.date('Start Date', required=True),
'date_end': fields.date('End Date'),
'working_hours': fields.many2one('resource.calendar','Working hours'),
'wage_type_id': fields.many2one('hr.contract.wage.type', 'Wage Type', required=True),
'wage': fields.float('Wage', digits=(16,2), required=True),
'advantages': fields.text('Advantages'),
'advantages_net': fields.float('Net Advantages Value', digits=(16,2)),
'advantages_gross': fields.float('Gross Advantages Value', digits=(16,2)),
'notes' : fields.text('Notes'),
'notes': fields.text('Notes'),
}
_defaults = {
'date_start' : lambda *a : time.strftime("%Y-%m-%d"),
+7 -7
View File
@@ -57,9 +57,9 @@
<field name="res_model">hr.contract.wage.type.period</field>
<field name="view_type">form</field>
</record>
<menuitem
action="action_hr_contract_wage_type_period"
id="hr_menu_contract_wage_type_period"
<menuitem
action="action_hr_contract_wage_type_period"
id="hr_menu_contract_wage_type_period"
parent="hr_contract.next_id_56"/>
@@ -76,7 +76,7 @@
<field name="job_id"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="working_hours_per_day_id"/>
<field name="working_hours"/>
<field name="wage_type_id"/>
<field name="wage"/>
</tree>
@@ -95,7 +95,7 @@
<separator colspan="2" string="Duration"/>
<field name="date_start" select="1"/>
<field name="date_end" select="1"/>
<field name="working_hours_per_day_id"/>
<field name="working_hours"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Advantages"/>
@@ -165,7 +165,7 @@
<separator colspan="2" string="Duration"/>
<field name="date_start" select="1"/>
<field name="date_end" select="1"/>
<field name="working_hours_per_day_id"/>
<field name="working_hours"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Advantages"/>
@@ -204,7 +204,7 @@
<field name="department_id"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="working_hours_per_day_id"/>
<field name="working_hours"/>
<field name="wage_type_id"/>
<field name="wage"/>
</tree>
+1 -1
View File
@@ -299,7 +299,7 @@ class task(osv.osv):
'remaining_hours': fields.float('Remaining Hours', digits=(16,4), help="Total remaining time, can be re-estimated periodically by the assignee of the task."),
'total_hours': fields.function(_hours_get, method=True, string='Total Hours', multi='hours', store=True, help="Computed as: Time Spent + Remaining Time."),
'progress': fields.function(_hours_get, method=True, string='Progress (%)', multi='hours', store=True, help="Computed as: Time Spent / Total Time."),
'delay_hours': fields.function(_hours_get, method=True, string='Delay Hours', multi='hours', store=True, help="Computed as: Total Time - Estimated Time. It gives the difference of the time estimated by the project manager and the real time to close the task."),
'delay_hours': fields.function(_hours_get, method=True, string='Delay Hours', multi='hours', store=True, help="Computed as difference of the time estimated by the project manager and the real time to close the task."),
'user_id': fields.many2one('res.users', 'Assigned to'),
'delegated_user_id': fields.related('child_ids','user_id',type='many2one', relation='res.users', string='Delegated To'),