Add Button : Configure your company data.

bzr revid: tta@openerp.com-20120531073726-00c9wpokzx6dtvhh
This commit is contained in:
Tejas Tank
2012-05-31 13:07:26 +05:30
parent 733f236a4f
commit df1bf63364
2 changed files with 19 additions and 2 deletions
+18 -1
View File
@@ -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:
+1 -1
View File
@@ -26,7 +26,7 @@
<group col="4" colspan="4" >
<p>You will also find several configuration options on your company data; address for the header and footer, overdue payments texts, etc.</p>
<newline/>
<p><button string="Configure Your Company Data"/></p>
<p><button type="object" name="open_company" string="Configure Your Company Data" icon="gtk-execute"/></p>
</group>
</sheet>
</form>