[MERGE]improve and merge
bzr revid: sgo@tinyerp.com-20120328093742-yqfl03g0fwzn91vi
This commit is contained in:
commit
aeb4e50fe6
|
@ -250,7 +250,8 @@ class project(osv.osv):
|
||||||
'active': True,
|
'active': True,
|
||||||
'priority': 1,
|
'priority': 1,
|
||||||
'sequence': 10,
|
'sequence': 10,
|
||||||
'type_ids': _get_type_common
|
'type_ids': _get_type_common,
|
||||||
|
'task' : True,
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: Why not using a SQL contraints ?
|
# TODO: Why not using a SQL contraints ?
|
||||||
|
|
|
@ -171,6 +171,7 @@
|
||||||
<field name="effective_hours"/>
|
<field name="effective_hours"/>
|
||||||
<field name="total_hours"/>
|
<field name="total_hours"/>
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
|
|
||||||
<field name="members"/>
|
<field name="members"/>
|
||||||
<field name="task"/>
|
<field name="task"/>
|
||||||
<field name="user_id"/>
|
<field name="user_id"/>
|
||||||
|
@ -192,12 +193,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="oe_module_desc">
|
<div class="oe_module_desc">
|
||||||
<h4 class="oe_project_font1"><a type="edit"><div class="oe_project_font"><field name="name"/></div></a></h4>
|
<h4 class="oe_project_font1"><a type="edit"><div class="oe_project_font"><field name="name"/></div></a></h4>
|
||||||
<div class="progress invoiced">
|
<table border="0" width="350px">
|
||||||
<br/>
|
<tr>
|
||||||
<t t-esc="Math.round(record.effective_hours.raw_value)"/> hrs
|
<td align="left" valign="bottom" class="buttons">
|
||||||
<progress t-att-value="record.effective_hours.raw_value" t-att-max="record.total_hours.raw_value"></progress>
|
<t t-if="record.task.raw_value">
|
||||||
<t t-esc="Math.round(record.total_hours.raw_value)"/> hrs
|
<button name="open_tasks" class="oe_project_buttons" type="object"><img src="/project/static/src/img/tasks_icon.png" width="50" height="50" align="center"/></button>
|
||||||
</div>
|
</t>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<table border="0" width="350px">
|
<table border="0" width="350px">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -206,10 +210,13 @@
|
||||||
<a type="edit"><img class="oe_topbar_avatar" data-default-src="/web/static/src/img/topbar-avatar.png" src="/web/static/src/img/topbar-avatar.png"/></a>
|
<a type="edit"><img class="oe_topbar_avatar" data-default-src="/web/static/src/img/topbar-avatar.png" src="/web/static/src/img/topbar-avatar.png"/></a>
|
||||||
</t>
|
</t>
|
||||||
</td>
|
</td>
|
||||||
<td align="right" valign="bottom" class="buttons">
|
<td align="right" valign="bottom">
|
||||||
<t t-if="record.task.raw_value">
|
<div class="progress invoiced">
|
||||||
<button name="open_tasks" class="oe_project_buttons" type="object"><img src="/project/static/src/img/tasks.png" width="20" height="20" align="top"/></button>
|
<br/>
|
||||||
</t>
|
<t t-esc="Math.round(record.effective_hours.raw_value)"/> hrs
|
||||||
|
<progress t-att-value="record.effective_hours.raw_value" t-att-max="record.total_hours.raw_value"></progress>
|
||||||
|
<t t-esc="Math.round(record.total_hours.raw_value)"/> hrs
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -38,7 +38,8 @@ font-size: 9px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: hidden;
|
border: hidden;
|
||||||
color: #0000FF;
|
color: #0000FF;
|
||||||
|
min-height: 50px;
|
||||||
|
min-width: 50px;*
|
||||||
}
|
}
|
||||||
|
|
||||||
.oe_project_buttons:hover {
|
.oe_project_buttons:hover {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 541 B |
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB |
|
@ -53,7 +53,7 @@
|
||||||
view_mode="tree,form,calendar,graph"
|
view_mode="tree,form,calendar,graph"
|
||||||
view_type="form"/>
|
view_type="form"/>
|
||||||
|
|
||||||
<menuitem name="Issues" id="menu_project_issue_track"
|
<menuitem name="Issues" id="menu_project_issue_track"
|
||||||
action="project_issue_categ_act0" sequence="15"/>
|
action="project_issue_categ_act0" sequence="15"/>
|
||||||
</data>
|
</data>
|
||||||
</openerp>
|
</openerp>
|
||||||
|
|
|
@ -391,7 +391,7 @@
|
||||||
</field>
|
</field>
|
||||||
<xpath expr="//td[@class='buttons']" position="inside">
|
<xpath expr="//td[@class='buttons']" position="inside">
|
||||||
<t t-if="record.issues.raw_value">
|
<t t-if="record.issues.raw_value">
|
||||||
<button name="open_issues" class="oe_project_buttons" type="object"><img src="/project/static/src/img/bug.png" width="18" height="18" align="top"/></button>
|
<button name="open_issues" class="oe_project_buttons" type="object"><img src="/project_issue/static/src/img/issue_icon.png" width="50" height="50" align="center"/></button>
|
||||||
</t>
|
</t>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -121,8 +121,8 @@
|
||||||
</field>
|
</field>
|
||||||
<xpath expr="//td[@class='buttons']" position="inside">
|
<xpath expr="//td[@class='buttons']" position="inside">
|
||||||
<t t-if="record.phases.raw_value">
|
<t t-if="record.phases.raw_value">
|
||||||
<button name="open_phase" class="oe_project_buttons" type="object">Phases</button>
|
<button name="open_phase" class="oe_project_buttons" type="object"><img src="/project_long_term/static/src/img/phases_icon.jpg" width="50" height="50" align="center"/></button>
|
||||||
</t>
|
</t>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
|
@ -43,6 +43,42 @@ class project_project(osv.osv):
|
||||||
res['value'].update({'to_invoice': factor_id})
|
res['value'].update({'to_invoice': factor_id})
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
def open_timesheets(self, cr, uid, ids, context=None):
|
||||||
|
#Open the View for the Timesheet of the project
|
||||||
|
"""
|
||||||
|
This opens Timesheets views
|
||||||
|
@return :Dictionary value for timesheet view
|
||||||
|
"""
|
||||||
|
if context is None:
|
||||||
|
context = {}
|
||||||
|
value = {}
|
||||||
|
data_obj = self.pool.get('ir.model.data')
|
||||||
|
for project in self.browse(cr, uid, ids, context=context):
|
||||||
|
# Get Timesheet views
|
||||||
|
tree_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_tree_inherit_account_id')
|
||||||
|
form_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_form_inherit_account_id')
|
||||||
|
search_view = data_obj.get_object_reference(cr, uid, 'project_timesheet', 'view_account_analytic_line_search_account_inherit')
|
||||||
|
context.update({
|
||||||
|
#'search_default_user_id': uid,
|
||||||
|
'search_default_project_id':project.id,
|
||||||
|
#'search_default_open':1,
|
||||||
|
})
|
||||||
|
value = {
|
||||||
|
'name': _('Bill Tasks Works'),
|
||||||
|
'context': context,
|
||||||
|
'view_type': 'form',
|
||||||
|
'view_mode': 'form,tree',
|
||||||
|
'res_model': 'account.analytic.line',
|
||||||
|
'view_id': False,
|
||||||
|
# 'domain':[('project_id','=', context.get('active_id',False))],
|
||||||
|
'context': context,
|
||||||
|
'views': [(tree_view and tree_view[1] or False, 'tree'),(form_view and form_view[1] or False, 'form')],
|
||||||
|
'type': 'ir.actions.act_window',
|
||||||
|
'search_view_id': search_view and search_view[1] or False,
|
||||||
|
'nodestroy': True
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
|
||||||
project_project()
|
project_project()
|
||||||
|
|
||||||
class project_work(osv.osv):
|
class project_work(osv.osv):
|
||||||
|
|
|
@ -23,6 +23,23 @@
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="view_project_kanban_inherited" model="ir.ui.view">
|
||||||
|
<field name="name">project.project.kanban.inherited</field>
|
||||||
|
<field name="model">project.project</field>
|
||||||
|
<field name="type">kanban</field>
|
||||||
|
<field name="inherit_id" ref="project.view_project_kanban"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="task" position="after">
|
||||||
|
<field name="timesheets"/>
|
||||||
|
</field>
|
||||||
|
<xpath expr="//td[@class='buttons']" position="inside">
|
||||||
|
<t t-if="record.timesheets.raw_value">
|
||||||
|
<button name="open_timesheets" class="oe_project_buttons" type="object"><img src="/project_timesheet/static/src/img/timesheet_icon.png" width="50" height="50" align="center"/></button>
|
||||||
|
</t>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="project_invoice_form_cutomer" model="ir.ui.view">
|
<record id="project_invoice_form_cutomer" model="ir.ui.view">
|
||||||
<field name="name">Inherit project form : Customer</field>
|
<field name="name">Inherit project form : Customer</field>
|
||||||
<field name="model">project.project</field>
|
<field name="model">project.project</field>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 888 B |
Loading…
Reference in New Issue