From 7346352fd95a97a84712df3ecd47fca161e2cd6e Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 9 Sep 2015 14:13:25 +0200 Subject: [PATCH] [FIX] account: new api typo, self.env.user is current user `uid` not defined in this context --- addons/account/models/res_config.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/account/models/res_config.py b/addons/account/models/res_config.py index de6c105d9b0..53414da5992 100644 --- a/addons/account/models/res_config.py +++ b/addons/account/models/res_config.py @@ -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', }