parent
e1ff635d22
commit
ff4a2b1c75
|
@ -163,11 +163,11 @@ class project(osv.osv):
|
|||
open_task[id] = len(task_ids)
|
||||
return open_task
|
||||
|
||||
def _cal_days(self, cr, uid, ids, field_name, arg, context=None):
|
||||
cal_days = {}
|
||||
def _uom_company(self, cr, uid, ids, field_name, arg, context=None):
|
||||
uom_company = {}
|
||||
for project in self.browse(cr,uid,ids):
|
||||
cal_days[project.id] = project.company_id.project_time_mode_id.factor or 8
|
||||
return cal_days
|
||||
uom_company[project.id] = project.company_id.project_time_mode_id.name or "Hour"
|
||||
return uom_company
|
||||
|
||||
|
||||
_columns = {
|
||||
|
@ -209,7 +209,7 @@ class project(osv.osv):
|
|||
'task': fields.boolean('Task',help = "If you check this field tasks appears in kanban view"),
|
||||
'open_task': fields.function(_open_task , type='integer',string="Open Tasks"),
|
||||
'color': fields.integer('Color Index'),
|
||||
'cal_days': fields.function(_cal_days ,type="integer", string="Calculate Days"),
|
||||
'uom_company': fields.function(_uom_company , type='string'),
|
||||
}
|
||||
def dummy(self, cr, uid, ids, context=None):
|
||||
return False
|
||||
|
|
|
@ -175,7 +175,6 @@
|
|||
<field name="user_id"/>
|
||||
<field name="date"/>
|
||||
<field name="color"/>
|
||||
<field name="cal_days"/>
|
||||
<field name="open_task"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
|
@ -217,7 +216,7 @@
|
|||
<tr>
|
||||
<th align="left" width="70px">Progress</th>
|
||||
<td align="left">
|
||||
<t t-esc="Math.round(record.effective_hours.raw_value/record.cal_days.value)"/>/<t t-esc="Math.round(record.planned_hours.raw_value/record.cal_days.value)"/> days
|
||||
<t t-esc="record.effective_hours.raw_value"/>/<t t-esc="record.planned_hours.raw_value"/> <field name="uom_company"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue