Record your timesheets for the project '%s'.
""") + help = _("""Record your timesheets for the project '%s'.
""") % (project.name,) try: if project.to_invoice and project.partner_id: help+= _("""Timesheets on this project may be invoiced to %s, according to the terms defined in the contract.
""" ) % (project.partner_id.name,) @@ -59,16 +62,13 @@ class project_project(osv.osv): # if the user do not have access rights on the partner pass - return { - 'type': 'ir.actions.act_window', - 'name': _('Timesheets'), - 'res_model': 'hr.analytic.timesheet', - 'view_type': 'form', - 'view_mode': 'tree,form', - 'context': view_context, - 'nodestroy': True, - 'help': help - } + res = mod_obj.get_object_reference(cr, uid, 'hr_timesheet', 'act_hr_timesheet_line_evry1_all_form') + id = res and res[1] or False + result = act_obj.read(cr, uid, [id], context=context)[0] + result['name'] = _('Timesheets') + result['context'] = view_context + result['help'] = help + return result project_project() diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 4d273d90b32..e0eab3dd4d0 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -139,7 +139,7 @@