[IMP] account: Add a link in res_config to configure the company

This commit is contained in:
Yannick Tivisse
2015-08-31 12:58:41 +02:00
parent 6534e2f203
commit 4688c1675b
2 changed files with 17 additions and 1 deletions
+13
View File
@@ -218,3 +218,16 @@ class AccountConfigSettings(models.TransientModel):
def onchange_analytic_accounting(self):
if self.group_analytic_accounting:
self.module_account_accountant = True
@api.multi
def open_company(self):
user = self.env['res.users'].browse(uid)
return {
'type': 'ir.actions.act_window',
'name': 'My Company',
'view_type': 'form',
'view_mode': 'form',
'res_model': 'res.company',
'res_id': user.company_id.id,
'target': 'current',
}
+4 -1
View File
@@ -18,7 +18,10 @@
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
</header>
<div>
<label string="You will find more options in your company details: address for the header and footer, overdue payments texts, etc."/>
<button type="object" name="open_company" string="Configure your company data" icon="gtk-execute" class="oe_inline oe_link"/>
</div>
<field name="has_default_company" invisible="1" />
<field name="has_chart_of_accounts" invisible="1"/>
<field name="complete_tax_set" invisible="1"/>