[IMP] timesheets imrpvoements
bzr revid: fp@tinyerp.com-20121026100207-yxbl87kx35to6blo
This commit is contained in:
parent
f2c5b7f599
commit
030ff3fd73
|
@ -1,5 +1,8 @@
|
|||
@charset "utf-8";
|
||||
.openerp .oe_form_readonly .oe_timesheet_button_add {
|
||||
.openerp .oe_form_readonly .oe_timesheet_weekly .oe_timesheet_button_add {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_form_readonly .oe_timesheet_weekly div.oe_view_nocontent {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_timesheet_weekly {
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
|
||||
.openerp
|
||||
.oe_form_readonly
|
||||
.oe_timesheet_button_add
|
||||
display: none
|
||||
.oe_timesheet_weekly
|
||||
.oe_timesheet_button_add
|
||||
display: none
|
||||
div.oe_view_nocontent
|
||||
display: none
|
||||
.oe_timesheet_weekly
|
||||
overflow-x: auto
|
||||
table
|
||||
|
|
|
@ -51,6 +51,18 @@
|
|||
<td class="oe_timesheet_weekly_supertotal oe_timesheet_total"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<div t-if="widget.accounts.length == 0">
|
||||
<div class="oe_view_nocontent">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to add a project you worked on.
|
||||
</p><p>
|
||||
You will be able to register your working hours and
|
||||
activities on these projects. You can also click on a
|
||||
selected project/analytic account to setup the
|
||||
invoicing options.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
|
|
|
@ -36,7 +36,7 @@ class hr_timesheet_current_open(osv.osv_memory):
|
|||
user_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)], context=context)
|
||||
if not len(user_ids):
|
||||
raise osv.except_osv(_('Error!'), _('Please create an employee and associate it with this user.'))
|
||||
ids = ts.search(cr, uid, [('user_id','=',uid),('state','=','draft'),('date_from','<=',time.strftime('%Y-%m-%d')), ('date_to','>=',time.strftime('%Y-%m-%d'))], context=context)
|
||||
ids = ts.search(cr, uid, [('user_id','=',uid),('state','in',('draft','new')),('date_from','<=',time.strftime('%Y-%m-%d')), ('date_to','>=',time.strftime('%Y-%m-%d'))], context=context)
|
||||
|
||||
if len(ids) > 1:
|
||||
view_type = 'tree,form'
|
||||
|
|
Loading…
Reference in New Issue