From df1bf6336457285c7ee445672450e366f6174000 Mon Sep 17 00:00:00 2001 From: Tejas Tank Date: Thu, 31 May 2012 13:07:26 +0530 Subject: [PATCH] Add Button : Configure your company data. bzr revid: tta@openerp.com-20120531073726-00c9wpokzx6dtvhh --- addons/base_setup/res_config.py | 19 ++++++++++++++++++- addons/base_setup/res_config_view.xml | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/addons/base_setup/res_config.py b/addons/base_setup/res_config.py index 461347aee3a..d18fda4fbcd 100644 --- a/addons/base_setup/res_config.py +++ b/addons/base_setup/res_config.py @@ -33,5 +33,22 @@ class base_config_settings(osv.osv_memory): 'module_share': fields.boolean('Allow Sharing Resources to External Users', help="""As an example, you will be able to share a project or some tasks to your customers, or quotes/sales to several persons at your customer company, or your agenda availabilities to your contacts."""), } - + + def open_company(self, cr, uid, ids, context=None): + if context is None: + context = {} + + company_obj = self.pool.get('res.company') + company_id = company_obj.browse(cr, uid, uid, context=context).id + + return { + 'name': 'Your Company', + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': 'res.company', + 'res_id': company_id, + 'view_id': False, + 'type': 'ir.actions.act_window', + } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_setup/res_config_view.xml b/addons/base_setup/res_config_view.xml index 464c11af4c7..737bc6fb72b 100644 --- a/addons/base_setup/res_config_view.xml +++ b/addons/base_setup/res_config_view.xml @@ -26,7 +26,7 @@

You will also find several configuration options on your company data; address for the header and footer, overdue payments texts, etc.

-