From 7a8a15ddceb9192bec901929cb8ef9abc7abdd22 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Tue, 20 Nov 2012 16:50:09 +0530 Subject: [PATCH 01/49] [IMP]add function for open timesheets from employee form view bzr revid: sgo@tinyerp.com-20121120112009-3a5k48dr1otlgs1v --- .../hr_timesheet_sheet/hr_timesheet_sheet.py | 27 ++++++++++++++++++- .../hr_timesheet_sheet_view.xml | 10 +------ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index bf6790c6be3..af2f5f07179 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -220,9 +220,34 @@ class hr_timesheet_sheet(osv.osv): if employee_id: department_id = self.pool.get('hr.employee').browse(cr, uid, employee_id, context=context).department_id.id return {'value': {'department_id': department_id}} - + hr_timesheet_sheet() +class hr_employee(osv.osv): + _inherit = "hr.employee" + + def open_timesheet(self, cr, uid, ids, context=None): + if context is None: + context = {} + employee = self.browse(cr, uid, ids[0], context) + view_context = { + 'search_default_employee_id' : [employee.id], + 'default_employee_id' : employee.id, + 'default_user_id': employee.user_id.id, + } + value = { + 'name': _('Timesheets'), + 'context': view_context, + 'view_type': 'form', + 'view_mode': 'tree,form', + 'res_model': 'hr_timesheet_sheet.sheet', + 'view_id': False, + 'type': 'ir.actions.act_window' + } + return value + +hr_employee() + class account_analytic_line(osv.osv): _inherit = "account.analytic.line" diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml index 6de6be6c08d..06779e73472 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -351,21 +351,13 @@ - - hr_timesheet_sheet.sheet - form - Timesheets - tree,form - {'search_default_employee_id': [active_id], 'default_employee_id': active_id} - - hr.timesheet.sheet.employee.extd_form hr.employee - @@ -98,7 +98,6 @@ -
From eb4d14cd86518a419dfc68e5e3c59e4672d3bc40 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Wed, 28 Nov 2012 01:14:49 +0100 Subject: [PATCH 47/49] [IMP] auth_signup remove all css, better wording, auth_oauth align button better wording bzr revid: al@openerp.com-20121128001449-jy86hb86eyv0milv --- addons/auth_oauth/auth_oauth_data.xml | 6 +++--- addons/auth_oauth/static/src/css/auth_oauth.css | 1 - addons/auth_signup/__openerp__.py | 1 - addons/auth_signup/static/src/css/Makefile | 3 --- addons/auth_signup/static/src/css/base.css | 10 ---------- addons/auth_signup/static/src/css/base.sass | 13 ------------- addons/auth_signup/static/src/js/auth_signup.js | 5 +++++ addons/auth_signup/static/src/xml/auth_signup.xml | 12 ++++++------ 8 files changed, 14 insertions(+), 37 deletions(-) delete mode 100644 addons/auth_signup/static/src/css/Makefile delete mode 100644 addons/auth_signup/static/src/css/base.css delete mode 100644 addons/auth_signup/static/src/css/base.sass diff --git a/addons/auth_oauth/auth_oauth_data.xml b/addons/auth_oauth/auth_oauth_data.xml index dbac9f4ed44..983549f9378 100644 --- a/addons/auth_oauth/auth_oauth_data.xml +++ b/addons/auth_oauth/auth_oauth_data.xml @@ -8,7 +8,7 @@ https://accounts.openerp.com/oauth2/tokeninfo zocial openerp - Sign in with OpenERP.com + Log in with OpenERP.com @@ -18,7 +18,7 @@ https://graph.facebook.com/me/permissions zocial facebook - Sign in with facebook + Log in with facebook Google OAuth2 @@ -27,7 +27,7 @@ https://www.googleapis.com/oauth2/v1/tokeninfo https://www.googleapis.com/oauth2/v1/userinfo zocial google - Sign in with google + Log in with google