[FIX] account: new api typo, self.env.user is current user

`uid` not defined in this context
This commit is contained in:
Olivier Dony
2015-09-09 14:13:40 +02:00
parent 3bf061dc09
commit 7346352fd9
+1 -2
View File
@@ -223,13 +223,12 @@ class AccountConfigSettings(models.TransientModel):
@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,
'res_id': self.env.user.company_id.id,
'target': 'current',
}