diff options
| author | Leonardo Pistone <leonardo.pistone@camptocamp.com> | 2015-05-29 17:30:36 +0200 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2015-07-07 12:47:13 +0200 |
| commit | 02ae76ce0b3f61444f9fbcd07ba1f2a92545d0ea (patch) | |
| tree | d2c7605cca607e5e952d42738fa0b6f735b588e6 | |
| parent | 0920c2fae06d2fda8298bcc55c6388eedefefdf5 (diff) | |
[FIX] account: type builtin used as a local variable
Close #6901
| -rw-r--r-- | addons/account/account_invoice.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 154014368c3..4f539c86a0b 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -343,8 +343,8 @@ class account_invoice(models.Model): # adapt selection of field journal_id for field in res['fields']: - if field == 'journal_id' and type: - journal_select = self.env['account.journal']._name_search('', [('type', '=', type)], name_get_uid=1) + if field == 'journal_id' and context.get('journal_type'): + journal_select = self.env['account.journal']._name_search('', [('type', '=', context['journal_type'])], name_get_uid=1) res['fields'][field]['selection'] = journal_select doc = etree.XML(res['arch']) |
