diff options
| author | Olivier Dony <odo@openerp.com> | 2015-09-09 14:13:25 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2015-09-09 14:13:40 +0200 |
| commit | 7346352fd95a97a84712df3ecd47fca161e2cd6e (patch) | |
| tree | 057889aa8075d462e3ee7c4e77f8d457b2337a8a | |
| parent | 3bf061dc09dad96ae8930dc38642cd4946a0ed7e (diff) | |
[FIX] account: new api typo, self.env.user is current user
`uid` not defined in this context
| -rw-r--r-- | addons/account/models/res_config.py | 3 |
1 files changed, 1 insertions, 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', } |
