[IMP] account: Add a link in res_config to configure the company
This commit is contained in:
@@ -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',
|
||||
}
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user